/* Stuart Adams -- Author site. Static rebuild of the former WordPress theme. */

:root {
  --accent: #a31b1b;
  --accent-dark: #821616;
  --link: #a31b1b;
  --link-hover: #821616;
  --beige: #ddd2b8;
  --beige-dark: #dbd2bb;
  --ink: #54657e;
  --footer-bg: #111111;
  --max-width: 1140px;
  --header-height: 84px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, sans-serif;
  --heading-sans: Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: bold;
  color: var(--accent);
  margin: 0 0 16px;
}

h1 { font-style: italic; }
h2, h3 { font-style: normal; text-transform: uppercase; }

h4, h5, h6 {
  font-family: var(--heading-sans);
  font-style: normal;
  text-transform: none;
  color: #0d3559;
  font-weight: 600;
  margin: 1.4em 0 .4em;
}

p { margin: 0 0 1em; }

/* ===================== Header / Nav ===================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: box-shadow .2s ease;
}

.site-header .container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: var(--header-height);
  padding-bottom: 6px;
}

.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo-link img { width: 150px; height: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
}
.nav-toggle span {
  width: 26px; height: 3px; background: var(--ink); border-radius: 2px;
}

.main-nav { display: flex; }
.main-nav > ul {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 4px;
}
.main-nav a {
  display: block;
  padding: 22px 14px 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav .current > a { color: var(--link); }

.has-dropdown { position: relative; }
.has-dropdown > a::after { content: " \25BE"; font-size: 11px; }
.dropdown {
  list-style: none;
  margin: 0; padding: 8px 0;
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-dropdown:hover > .dropdown,
.has-dropdown.open > .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a { padding: 10px 18px; }

/* ===================== Hero (home / lukas) ===================== */

.hero {
  padding: calc(var(--header-height) + 60px) 0 60px;
  background: var(--beige-dark);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 901px) {
  /* Heroes with a small, fixed-width framed image (not a full-bleed photo): size
     the image column to its content and match edge padding to the column gap,
     so the left margin, the text/image gap, and the right margin are all equal. */
  .hero:has(.promo-image.book-cover-framed) .container { grid-template-columns: 1fr auto; padding-left: 40px; padding-right: 40px; }
}
.hero h1 {
  font-size: 2.2rem;
  min-height: 1.3em;
}
.hero h1 .eyebrow {
  display: block;
  font-size: 1rem;
  text-transform: uppercase;
  color: #0d3559;
  font-style: normal;
  margin-bottom: .2em;
}
.typed-cursor {
  opacity: 1;
  font-weight: 100;
  color: var(--link);
  animation: cursor-blink 0.7s infinite;
}
@keyframes cursor-blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}
.hero p { font-size: 1.02rem; color: #0d3559; }
.hero .promo-image img { border-radius: 6px; }
.book-cover-framed img,
img.book-cover-framed {
  border: 6px solid #fff;
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
}
.book-cover-framed.on-light img,
img.book-cover-framed.on-light {
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.hero .promo-image.cover-trio { display: flex; gap: 12px; }
.hero .promo-image.cover-trio img { width: calc((100% - 24px) / 3); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.hero .promo-image.reveal { transform: translateX(40px); }
.hero .promo-image.reveal.in { transform: none; }
.hero .hero-copy.reveal { transform: translateX(-40px); }
.hero .hero-copy.reveal.in { transform: none; }

/* 7 Sleeps hero: live web-preview iframe below the blurb on desktop, static art + Play Now button on mobile */
#sevensleeps-hero .hero-play-btn { display: none; }
#sevensleeps-hero .hero-embed { display: none; }
#sevensleeps-hero .hero-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 6px solid #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
@media (min-width: 901px) {
  #sevensleeps-hero .container { grid-template-columns: 1fr; }
  #sevensleeps-hero .promo-image { display: none; }
  #sevensleeps-hero .hero-embed {
    display: block;
    width: 75vw;
    margin: 40px auto 0;
  }
}
@media (max-width: 900px) {
  #sevensleeps-hero .hero-play-btn { display: inline-flex; margin-top: 20px; }
}

/* ===================== Page header (inner pages) ===================== */

.page-header {
  padding: calc(var(--header-height) + 12px) 0 12px;
  background: var(--beige);
  text-align: center;
}
.page-header h1 { font-size: 2rem; margin: 0; color: var(--accent); }
.page-header .post-meta {
  margin-top: 10px;
  font-family: var(--sans);
  font-style: normal;
  font-size: .85rem;
  color: var(--accent);
  text-transform: none;
}
.page-header .post-meta ul { list-style: none; display: flex; gap: 16px; justify-content: center; margin: 0; padding: 0; }

/* ===================== Sections ===================== */

section { padding: 70px 0; }
section.tight { padding: 40px 0; }

.section-title { text-align: center; max-width: 700px; margin: 0 auto 40px; }
.section-title h2 { font-size: 1.6rem; }
.section-title .rule {
  width: 6px;
  height: 0;
  position: relative;
  border-top: 2px solid #00aeef;
  margin: 20px auto 18px;
}
.section-title .rule::before,
.section-title .rule::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 30px;
  border-top: 2px solid #00aeef;
}
.section-title .rule::before { left: -34px; }
.section-title .rule::after { right: -34px; }

.reveal-zoom {
  opacity: 0;
  transform: scale(.3);
  transition: opacity .5s ease, transform .5s cubic-bezier(.175,.885,.32,1.275);
}
.reveal-zoom.in { opacity: 1; transform: scale(1); }

.prose { max-width: 700px; margin: 0 auto; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }
.prose h3 {
  font-family: var(--serif);
  font-style: normal;
  text-transform: none;
  color: #0d3559;
  font-weight: 600;
  font-size: 1.05em;
  margin: 1.4em 0 .4em;
}
.prose blockquote {
  margin: 1.5em 0;
  padding: .1em 0 .1em 1.2em;
  border-left: 3px solid var(--accent);
  font-style: italic;
}
.prose blockquote p { margin: 0 0 .5em; }
.prose blockquote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: .9em;
  color: #0d3559;
}
.prose blockquote cite::before { content: "\2014  "; }

/* About page bio: a little editorial flair on the copy */
#bio > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.6em;
  font-weight: bold;
  font-style: italic;
  color: var(--accent);
  float: left;
  line-height: .78;
  margin: .02em .1em -0.05em 0;
}
#bio h4 {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .82rem;
  font-weight: 700;
}
#bio blockquote {
  position: relative;
  padding: .2em 1.3em .2em 2.3em;
  font-size: 1.12em;
  color: #3d4f66;
}
#bio blockquote::before {
  content: "\201C";
  position: absolute;
  left: .18em;
  top: -.22em;
  font-family: var(--serif);
  font-size: 2.8em;
  font-style: normal;
  color: var(--accent);
  line-height: 1;
  opacity: .55;
}

/* Feature block: red-accented callout, optional background image */
.feature {
  position: relative;
  padding: 70px 0;
  color: #fff;
  background: #262626;
  background-size: cover;
  background-position: center;
  text-align: center;
}
.feature::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(10,10,10,.6);
}
.feature .container { position: relative; max-width: 760px; }
.feature h2 { color: #ff4040; }
.feature h3 { color: #fff; }
.feature p { color: #f2f2f2; }
.feature img { margin: 0 auto 20px; }
.feature a:not(.btn) { color: #ff4040; }
.feature a:not(.btn):hover { color: #fff; }
.feature.no-overlay::before { content: none; }

.letter-table {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-collapse: collapse;
  text-align: left;
}
.letter-table td {
  padding: 12px 16px;
  vertical-align: top;
  color: #f2f2f2;
}
.letter-table tr:not(:last-child) td { border-bottom: 1px solid rgba(255,255,255,.14); }
.letter-table td:first-child {
  white-space: nowrap;
  font-weight: 700;
  color: #fff;
  padding-right: 24px;
}

.screenshot-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 30px;
}
.screenshot-tiles img { margin: 0; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
@media (max-width: 560px) {
  .screenshot-tiles { grid-template-columns: 1fr; }
  .letter-table td { padding: 10px 8px; font-size: .92rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 30px;
  background: var(--accent);
  color: #fff;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: .875rem;
  letter-spacing: .04em;
  border: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn.btn-outline { background: transparent; border: 2px solid #fff; }
.btn.btn-outline:hover { background: #fff; color: var(--ink); }
.feature .container > .btn + .btn { margin-left: 12px; }
@media (max-width: 600px) {
  .feature .container > .btn + .btn { margin-left: 0; margin-top: 12px; }
}

.store-btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }
.store-btns .btn {
  display: inline-flex; align-items: center; gap: 8px;
}
.store-btns .btn:hover { background: var(--accent-dark); }
.store-btns svg { width: 18px; height: 18px; fill: currentColor; }

/* ===================== Carousels ===================== */

.carousel {
  display: flex;
  justify-content: safe center;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 20px;
  scrollbar-width: thin;
}
.carousel .slide {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: start;
}
.carousel.books .slide {
  width: 220px;
  position: relative;
  background: #fff;
  border: 1px solid #e6e1d3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.carousel.books .slide:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 30px rgba(0,0,0,.2);
}
.carousel.books .slide img:hover { transform: none; }
.carousel.books .slide img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.carousel.books .slide p {
  margin: 0;
  padding: 14px 12px;
  font-weight: 600;
}
.legacy-table {
  gap: 24px;
  padding: 0;
  width: fit-content;
  margin: 0 auto;
  max-width: 100%;
}
.legacy-table .slide {
  width: 240px;
  scroll-snap-align: none;
  background: #fff;
  border: 1px solid #e6e1d3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.legacy-table .slide:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 30px rgba(0,0,0,.2);
}
.legacy-table .slide img:hover { transform: none; }
.legacy-table .slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin: 0;
  box-shadow: none;
}
.legacy-table .slide p {
  margin: 0;
  padding: 14px 12px;
  font-weight: 600;
}
.carousel img {
  border-radius: 6px;
  cursor: zoom-in;
  transition: transform .2s ease;
}
.carousel img:hover { transform: scale(1.02); }
.carousel-wrap { position: relative; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.55); color: #fff;
  font-size: 1.1rem; cursor: pointer; z-index: 2;
}
.carousel-nav:hover { background: var(--accent); }
.carousel-nav.prev { left: -6px; }
.carousel-nav.next { right: -6px; }
@media (max-width: 640px) { .carousel-nav { display: none; } }

.blog-carousel { display: grid; gap: 20px; }
.blog-card {
  background: #f8f6f1;
  border-radius: 6px;
  padding: 24px;
}
.blog-card h3 { font-size: 1.1rem; margin-bottom: .4em; }
.blog-card .read-more { font-weight: 600; text-transform: uppercase; font-size: .875rem; }

/* ===================== Timeline (Through the years) ===================== */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.timeline .icon-outer {
  width: 90px; height: 90px; margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.timeline img { width: 60%; }
.timeline h4 { font-family: var(--sans); font-style: normal; text-transform: none; font-size: .95rem; }

/* ===================== Video ===================== */

.video-feature { text-align: center; }
.play-btn {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-top: 20px; cursor: pointer; border: none;
}
.video-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.video-modal.open { display: flex; }
.video-modal .frame-wrap { width: min(900px, 100%); aspect-ratio: 16/9; position: relative; }
.video-modal iframe { width: 100%; height: 100%; border: 0; }
.video-modal .close {
  position: absolute; top: -40px; right: 0; color: #fff; font-size: 1.8rem;
  background: none; border: none; cursor: pointer;
}

/* ===================== Gallery / lightbox ===================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-grid img { cursor: zoom-in; border-radius: 6px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.photo-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.photo-card {
  width: 240px;
  background: #fff;
  border: 1px solid #e6e1d3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.photo-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 16px 30px rgba(0,0,0,.2); }
.photo-card img { width: 100%; display: block; margin: 0; cursor: zoom-in; }

.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.9);
  display: none; align-items: center; justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 4px; }
.lightbox .close {
  position: absolute; top: 20px; right: 30px; color: #fff; font-size: 2rem;
  background: none; border: none; cursor: pointer;
}
.lightbox .nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color: #fff; border: none;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.lightbox .nav-btn:hover { background: rgba(255,255,255,.3); }
.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

/* ===================== Book / cover grid ===================== */

.book-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  align-items: start;
  text-align: left;
  max-width: 760px;
  margin: 0 auto;
}
.book-block img { border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.book-block.center { grid-template-columns: 1fr; justify-items: center; text-align: center; }

/* ===================== Contact ===================== */

.contact-block {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  color: var(--ink);
  padding: 40px 30px;
  border-radius: 8px;
}
.contact-block h3, .contact-block p { color: var(--ink); }
.contact-form { text-align: left; margin-top: 30px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; margin-bottom: 18px;
  border: 1px solid #999; border-radius: 4px; font-family: var(--sans); font-size: 1rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-note { font-size: .9rem; color: #666; margin-top: 14px; }
.contact-block .form-note a { color: var(--accent); text-decoration: underline; }
.form-error { display: none; color: var(--accent); font-size: .85rem; margin: -12px 0 18px; }
.form-error.show { display: block; }
.contact-form input.field-error { border-color: var(--accent); }

/* ===================== Links list (media page) ===================== */

.link-list { max-width: 700px; margin: 0 auto; text-align: center; }
.link-list p, .link-list div { margin-bottom: .6em; }

/* ===================== Blog / posts ===================== */

.post-body { max-width: 760px; margin: 0 auto; }
.post-body img { margin: 0 auto 20px; }
.category-tag {
  display: inline-block; margin-top: 30px; padding: 6px 14px;
  background: #f0ece2; border-radius: 20px; font-size: .8rem; text-transform: uppercase;
}

/* ===================== Footer ===================== */

.site-footer {
  background: var(--footer-bg);
  color: #ccc;
  padding: 24px 0;
  text-align: center;
  font-size: .9rem;
}
.site-footer a { color: #fff; text-decoration: underline; }

/* ===================== Scroll reveal ===================== */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===================== Responsive ===================== */

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero .promo-image { max-width: 320px; margin: 0 auto; justify-self: center; overflow: hidden; }
  .hero .promo-image img { width: 125%; max-width: 125%; }
  .hero .promo-image.cover-trio { max-width: 360px; overflow: visible; }
  .hero .promo-image.cover-trio img { width: calc((100% - 24px) / 3); max-width: calc((100% - 24px) / 3); }
  .hero .promo-image:has(#sevensleeps-mobile-shot) { max-width: 420px; overflow: visible; }
  #sevensleeps-mobile-shot { width: 100%; max-width: 100%; }
  .hero .promo-image.book-cover-framed { overflow: visible; }
  .hero .promo-image.book-cover-framed img { width: 100%; max-width: 100%; }
  .book-block { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1180px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .main-nav > ul { flex-direction: column; width: 100%; gap: 0; }
  .main-nav > ul > li { border-top: 1px solid #eee; }
  .dropdown {
    position: static; box-shadow: none; opacity: 1; visibility: visible;
    transform: none; display: none; padding-left: 16px;
  }
  .has-dropdown.open .dropdown { display: block; }
  .has-dropdown > a::after { float: right; }
}

@media (max-width: 780px) {
  .post-float-img {
    float: none !important;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px 0 !important;
  }

  .legacy-table {
    flex-direction: column;
    overflow-x: visible;
    width: 100%;
    border: none;
    align-items: center;
  }
  .legacy-table .slide {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  /* No horizontal scrolling on mobile: image carousels wrap instead of scrolling. */
  .carousel {
    flex-wrap: wrap;
    overflow-x: visible;
    scroll-snap-type: none;
    justify-content: center;
  }
  .carousel-nav { display: none; }

  .blog-carousel {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 560px) {
  .timeline { grid-template-columns: 1fr 1fr; }
  section { padding: 50px 0; }
  .hero h1 { font-size: 1.7rem; }
}
