:root { --img-w: 1774; --img-h: 887; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #140d07;
}
html { scroll-behavior: smooth; }
/* keep the form clear of the sticky mobile nav bar when jumped to */
.contact { scroll-margin-top: 4.5rem; }

/* Stack sections vertically; hero sits at the top, series below the fold. */
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Backdrop keeps the artwork's aspect ratio and is capped by BOTH the window
   width and the window height, so the full image always fits on screen.
   max-width = (viewport height x aspect ratio) guarantees height <= 100svh.
   container-type lets us size text in cqw (1cqw = 1% of this box's width),
   so every real-text element scales in lockstep with the image.
   Image path is relative to this CSS file: assets/css/ -> assets/images/ */
.hero {
  position: relative;
  width: 100%;
  max-width: min(var(--img-w) * 1px, calc(100svh * var(--img-w) / var(--img-h)));
  margin: 0 auto;
  aspect-ratio: var(--img-w) / var(--img-h);
  background: url("../images/hero.png") center / cover no-repeat;
  container-type: inline-size;
}

/* ---- Real navigation text (crawlable, selectable) ---- */
.nav-row {
  position: absolute;
  top: 5.2%;
  left: 20.5%;
  display: flex;
  gap: 2.4cqw;
  align-items: baseline;
}
.nav {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 2.05cqw;
  line-height: 1;
  color: #f8f1db;
  text-decoration: none;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5), 0 0 2px rgba(0,0,0,0.45);
  white-space: nowrap;
  transition: color .15s ease;
}
.nav:hover, .nav:focus-visible { color: #ffe29a; outline: none; }

/* ---- Real page heading (renders as Trajan-style caps, matching the design) ---- */
.site-title {
  position: absolute;
  top: 14.5%;
  left: 15%;
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: 4.9cqw;
  line-height: 1;
  letter-spacing: 0.015em;
  color: #f2e4bd;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45), 0 0 4px rgba(50,32,8,0.55);
  white-space: nowrap;
}

/* ---- Clickable book covers (scalable hit areas) ---- */
.book {
  position: absolute;
  display: block;
  text-indent: -9999px;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
.book:hover, .book:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,220,130,0.55),
              0 10px 30px rgba(0,0,0,0.45);
}

.book-haole    { left: 23.1%; top: 42.7%; width: 14.1%; height: 46.3%; }
.book-ascending{ left: 41.9%; top: 46.8%; width: 10.1%; height: 44.6%; }

/* ---- Clickable mug + hover tea popover ---- */
.mug {
  position: absolute;
  left: 67.2%; top: 74%; width: 11.3%; height: 17.8%;
  display: block;
  text-indent: -9999px; overflow: hidden;
  border-radius: 8px;
  cursor: pointer; outline: none;
  transition: box-shadow .15s ease;
}
.mug:hover, .mug:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,220,130,0.6), 0 8px 24px rgba(0,0,0,0.4);
}

.tea-popover {
  position: absolute;
  left: 67.35%; top: 63%; width: 11%;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: 50% 100%;
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;      /* never blocks clicks or hover */
  z-index: 5;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
}
.tea-popover img { display: block; width: 100%; height: auto; }

/* Reveal when the mug is hovered or keyboard-focused */
.mug:hover + .tea-popover,
.mug:focus-visible + .tea-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =========================================================================
   MOBILE LAYOUT
   Below phone width the landscape artwork becomes a banner, and the nav,
   title and book links reflow into a readable, tappable stacked layout.
   ========================================================================= */

/* Mobile-only elements are hidden on desktop. */
.m-nav,
.m-panel { display: none; }

@media (max-width: 760px) {
  /* Stack normally instead of vertically centering one hero box. */
  body {
    display: block;
    min-height: 0;
  }

  /* Hero becomes a full-width banner; all desktop overlays are hidden. */
  .hero {
    max-width: none;
    width: 100%;
    aspect-ratio: 2 / 1;      /* whole scene, nothing cropped */
  }
  .hero > * { display: none; }

  /* Sticky top navigation bar */
  .m-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1.4rem;
    padding: 0.85rem 1rem;
    background: #1b130b;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .m-nav a {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.1;
    color: #f8f1db;
    text-decoration: none;
  }
  .m-nav a:active { color: #ffe29a; }

  /* Content panel under the banner */
  .m-panel {
    display: block;
    text-align: center;
    padding: 1.3rem 1.1rem 2.3rem;
    background: #140d07;
  }
  .m-title {
    font-family: "Cinzel", "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f2e4bd;
    font-size: clamp(1.6rem, 8vw, 2.3rem);
    margin: 0 0 1.15rem;
  }
  .m-books {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.1rem;
  }
  .m-books a {
    flex: 1 1 42%;
    max-width: 240px;
    padding: 0.75rem 1rem;
    border: 1px solid #6b5836;
    border-radius: 8px;
    background: #241a10;
    color: #f6edd6;
    text-decoration: none;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    font-size: 1.2rem;
  }
  .m-books a:active { background: #2f2316; }
  .m-tea { margin: 0; }
  .m-tea a {
    color: #cdb88a;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(205,184,138,0.4);
  }
}

/* =========================================================================
   SOLAR MINIMUM SERIES SECTION (below the fold)
   ========================================================================= */
.series {
  position: relative;
  width: 100%;
  max-width: min(var(--img-w) * 1px, calc(100svh * var(--img-w) / var(--img-h)));
  margin: 0 auto;
  aspect-ratio: var(--img-w) / var(--img-h);
  background: url("../images/series-bg.png") center / cover no-repeat;
  container-type: inline-size;
}

/* Real banner text (set into the empty gold plaque) */
.series-title {
  position: absolute;
  top: 11.6%;
  left: 0; right: 0;
  margin: 0;
  text-align: center;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.95cqw;
  letter-spacing: 0.14em;
  color: #f2db97;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.series-sub {
  position: absolute;
  top: 21.0%;
  left: 0; right: 0;
  margin: 0;
  text-align: center;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.12cqw;
  letter-spacing: 0.33em;
  text-transform: uppercase;
  color: #decea7;
  text-shadow: 0 1px 5px rgba(0,0,0,0.6);
}

/* Clickable book covers on the shelf (front cover only, spine excluded) */
.sbook {
  position: absolute;
  top: 28.5%;
  height: 51.5%;
  display: block;
  text-indent: -9999px;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: box-shadow .15s ease;
}
.sbook:hover,
.sbook:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,220,130,0.6), 0 10px 30px rgba(0,0,0,0.45);
}
.sbook-1 { left: 11.2%; width: 15.5%; }
.sbook-2 { left: 32.3%; width: 15.3%; }
.sbook-3 { left: 53.4%; width: 15.4%; }
.sbook-4 { left: 74.6%; width: 15.3%; }

/* Mobile series section hidden on desktop */
.m-series { display: none; }

@media (max-width: 760px) {
  /* Desktop shelf section hidden; show the mobile version */
  .series { display: none; }

  .m-series {
    display: block;
    background: #140d07;
    padding: 0 0 2rem;
  }
  .m-series > img {
    display: block;
    width: 100%;
    height: auto;
  }
  .m-sbooks {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.3rem 1.1rem 0;
  }
  .m-sbooks a {
    display: block;
    text-align: center;
    padding: 0.8rem 1rem;
    border: 1px solid #6b5836;
    border-radius: 8px;
    background: #241a10;
    color: #f6edd6;
    text-decoration: none;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    font-size: 1.2rem;
  }
  .m-sbooks a:active { background: #2f2316; }
}

/* =========================================================================
   CONTACT SECTION (form confined to the center wood panel)
   ========================================================================= */
.contact {
  width: 100%;
  max-width: min(var(--img-w) * 1px, calc(100svh * var(--img-w) / var(--img-h)));
  /* Pull up ~2.93% so the strip of shelf-wood baked into the top of this
     image overlaps the matching wood above — the join becomes seamless. */
  margin: -2.93% auto 0;
  background-image: url("../images/contact-bg-seam.png");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(2.75rem, 6vw, 5rem) 1rem;
}

.contact-form {
  width: 100%;
  max-width: 470px;          /* keeps the form inside the center panel */
  text-align: center;
}
.contact-title {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  color: #f2e4bd;
  font-size: 1.95rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.3rem;
  text-shadow: 0 2px 7px rgba(0,0,0,0.6);
}
.contact-intro {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #e4d3ac;
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.contact-form label {
  display: block;
  text-align: left;
  margin-bottom: 0.9rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  color: #eeddb5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid #7a6038;
  border-radius: 6px;
  background: rgba(247,241,224,0.95);
  color: #2a1d10;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #caa24e;
  border-color: #caa24e;
  background: #fbf6e6;
}
.contact-form textarea { resize: vertical; min-height: 6rem; }

/* honeypot */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.contact-submit {
  margin-top: 0.5rem;
  padding: 0.72rem 1.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #2a1a0b;
  background: linear-gradient(#e8c877, #c79a44);
  box-shadow: 0 3px 11px rgba(0,0,0,0.45);
  transition: filter .15s ease, transform .05s ease;
}
.contact-submit:hover { filter: brightness(1.07); }
.contact-submit:active { transform: translateY(1px); }
.contact-submit:disabled { opacity: 0.6; cursor: default; }

.form-status {
  min-height: 1.3em;
  margin: 0.85rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.02rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.form-status.ok  { color: #c6ecac; }
.form-status.err { color: #f2b2a2; }

/* =========================================================================
   FOOTER (full-width solid dark brown)
   ========================================================================= */
.site-footer {
  width: 100%;
  background: #221307;
  color: #cdb88a;
  padding: 2.5rem 1.2rem 2.7rem;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
}
.site-footer .social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.5rem;
  margin-bottom: 1.1rem;
}
.site-footer .social a {
  color: #e6cf93;
  text-decoration: none;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.site-footer .social a:hover { color: #ffe9a8; }
.footer-email { margin: 0.2rem 0; }
.footer-email a {
  color: #d4bf93;
  text-decoration: none;
  border-bottom: 1px solid rgba(205,184,138,0.4);
}
.footer-email a:hover { color: #ffe9a8; }
.footer-copy { margin: 0.85rem 0 0; font-size: 0.9rem; color: #9c8a6a; }

@media (max-width: 760px) {
  .contact { max-width: none; padding: 2.5rem 1.1rem; margin-top: 0; }
  .contact-form { max-width: 460px; }
}
