/* Chronicles of Wordcraft — Homepage V2.0
   Production clean-up: one authoritative base rule per component; responsive overrides
   remain exclusively in their own media query. No site-wide CSS dependencies.
   Protected header, portal, CTA artwork, books, coastline, and footer retain geometry.
*/
/* Headings and body text match the Chronicles of Wordcraft brand system.
   Fonts are requested from Google Fonts; local fallback is retained for offline review.
   Font files are not bundled with the homepage update. */
:root {
  --night: #061629;
  --navy: #061a32;
  --gold: #efc777;
  --border-gold: #bb8839;
  --paper: #f5dbac;
  --ink: #211a11;
  --link-rest: #f9e6bf;
  --link-hover: #ffce67;
  --link-rule: #efb44b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #061629 url('homepage-surround.webp') center top / cover no-repeat; color: #fff1d6; font-family: Georgia, 'Times New Roman', serif; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #fff4bc; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Main frame and protected horizontal header */
.site { width: calc(100% - 32px); max-width: 1200px; margin: 16px auto 0; border: 2px solid var(--border-gold); background: #04152b; box-shadow: 0 15px 70px #0009; }
.header { min-height: 82px; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(#001129,#071d32); border-bottom: 2px solid #bd8c44; }
.brand { min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.brand-title, .brand-by { display: block; text-align: center; white-space: nowrap; }
.brand-title { font-size: 25px; font-weight: 700; letter-spacing: .02em; color: #f6d39b; }
.brand-by { font-size: 11px; color: #dabc79; letter-spacing: .15em; margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a, .footer-links a { display: inline-block; color: var(--link-rest); text-decoration: none; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease; }
.nav a { padding: 10px 0; font-size: 17px; white-space: nowrap; }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current='page'] { color: var(--link-hover); border-bottom-color: var(--link-rule); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--link-hover); text-decoration-color: var(--link-rule); }

/* Protected portal artwork; only supporting copy is live text */
.hero { position: relative; background: #04152b; line-height: 0; container-type: inline-size; }
.hero-art { display: block; width: 100%; height: auto; }
.guidepost-copy { position: absolute; left: 18.5%; width: 50%; top: 82.2%; text-align: center; line-height: 1.2; color: #fff0d5; text-shadow: 0 2px 3px #00101d, 0 0 5px #00101d; }
.guidepost-copy p { margin: 0; font-family: Georgia, serif; font-style: italic; font-size: 2.14cqw; line-height: 1.28; }

/* Three equal standalone CTA images: no second CSS frame */
.choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(9px,1.2vw,23px); padding: clamp(10px,1.1vw,23px) clamp(16px,2.2vw,46px); background: #071b33; }
.choice { display: block; min-width: 0; overflow: visible; transition: transform .16s, filter .16s; }
.choice img { width: 100%; height: auto; display: block; aspect-ratio: 936/465; object-fit: contain; }
.choice:hover { transform: translateY(-3px); filter: brightness(1.1); }
.choice:focus-visible { outline: 3px solid #ffe2a6; outline-offset: 3px; }

/* Engraved section masters with live, selectable copy */
.plate { position: relative; width: 100%; container-type: inline-size; line-height: 0; background: #f8e2b5; color: var(--ink); overflow: hidden; }
.plate-image { width: 100%; height: auto; display: block; }
.craft-content, .about-content { position: absolute; inset: 0; line-height: 1.2; text-align: center; pointer-events: none; }
.craft-content h2, .about-content h2 { position: absolute; left: 20%; width: 60%; top: 7.2%; margin: 0; font-family: 'Cinzel', Georgia, serif; font-size: 2.43cqw; letter-spacing: 0; line-height: 1.12; font-weight: 700; }
.craft-columns { position: absolute; top: 51.5%; left: 8.9%; width: 82.2%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3.7%; align-items: start; }
.craft-columns article { min-width: 0; text-align: center; }
.craft-columns h3 { font-family: 'Cinzel', Georgia, serif; font-size: 1.72cqw; line-height: 1.13; margin: 0 0 .32cqw; font-weight: 700; white-space: nowrap; }
.craft-columns p { font-family: 'EB Garamond', Georgia, serif; font-size: 1.84cqw; line-height: 1.16; font-weight: 500; margin: 0 auto; max-width: 23cqw; }
.mobile-icon, .about-mobile-art { display: none; }
.about-content h2 { top: 5%; }
.about-content p { position: absolute; top: 22.5%; left: 28.5%; width: 43%; margin: 0; font-family: 'EB Garamond', Georgia, serif; font-size: 1.60cqw; line-height: 1.18; font-weight: 500; }
.about-signature { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); display: block; width: 16%; height: auto; max-height: 33%; object-fit: contain; opacity: .87; filter: sepia(.55) saturate(1.5); pointer-events: none; }

/* The footer engraving is protected. Legal/privacy remain visible real links. */
.footer-plate { position: relative; width: 100%; container-type: inline-size; line-height: 0; background: #061a32; }
.footer-art { width: 100%; height: auto; display: block; }
.footer-links { position: absolute; left: 62%; width: 28%; top: 68%; display: flex; justify-content: center; gap: clamp(15px,1.2cqw,23px); align-items: center; line-height: 1.2; font-size: clamp(14px,1.28cqw,19px); color: #f3d49d; }
.footer-links a { padding: 5px 8px; line-height: 1.2; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: none; transition: color .15s ease, text-decoration-color .15s ease; }
.mobile-footer { display: none; }

/* Layout breakpoints; one authoritative block for each range. */
@media (max-width: 1120px) {
  .header { flex-wrap: wrap; justify-content: center; gap: 4px; }
  .nav { justify-content: center; width: 100%; }
}
@media (max-width: 900px) {
  /* Switch engraved desktop plates to readable, reflowed content before text becomes tiny. */
  .hero { overflow: hidden; }
  .hero-art { width: 100%; max-width: none; margin: 0; }
  .guidepost-copy { position: relative; left: auto; width: auto; top: auto; padding: 10px 18px 16px; background: #061a32; }
  .guidepost-copy p { font-size: 16px; line-height: 1.3; }
  .choices { grid-template-columns: 1fr; gap: 12px; padding: 16px 14px; }
  .choice { width: min(100%,430px); margin: auto; }
  .plate { background: #f7dfb0 url('parchment-grain.webp') center/240px auto; color: #211a11; border-top: 2px solid #bb8839; }
  .plate-image { display: none; }
  .craft-content, .about-content { position: relative; inset: auto; pointer-events: auto; }
  .craft-content h2, .about-content h2 { position: static; width: auto; font-size: clamp(22px,6vw,28px); padding: 22px 14px 12px; line-height: 1.1; }
  .craft-columns { position: static; width: auto; display: grid; grid-template-columns: 1fr; gap: 0; padding: 5px 24px 26px; }
  .craft-columns article { padding: 14px 5px 17px; border-bottom: 1px solid #c89b5b; }
  .craft-columns article:last-child { border-bottom: 0; }
  .mobile-icon { display: block; height: 56px; max-width: 100px; object-fit: contain; margin: 0 auto 6px; }
  .craft-columns h3 { font-size: 19px; margin: 5px 0; }
  .craft-columns p { font-size: 19px; max-width: 300px; line-height: 1.27; }
  .about-content p { position: static; width: auto; margin: 0 auto; max-width: 420px; padding: 4px 22px 14px; font-size: 19px; line-height: 1.32; }
  .about-signature { position: static; left: auto; bottom: auto; transform: none; width: min(68%,260px); max-height: none; margin: 2px auto 14px; }
  .about-mobile-art { display: flex; gap: 6px; justify-content: center; align-items: center; padding: 0 10px 17px; }
  .about-mobile-art img { width: 48%; max-width: 220px; height: auto; mix-blend-mode: multiply; }
  .footer-art { display: none; }
  .mobile-footer { display: flex; flex-direction: column; align-items: center; padding: 22px 14px 50px; background: #061b31; text-align: center; line-height: 1.2; }
  .mobile-footer img { width: 85px; height: auto; }
  .mobile-footer p { font-size: 19px; color: #e6c36e; font-weight: 700; margin: 7px auto; }
  .mobile-footer p.mobile-footer-tagline { font-weight: 400; font-size: 17px; font-style: italic; max-width: 320px; }
  .footer-links { top: auto; bottom: 13px; left: 0; width: 100%; font-size: 15px; z-index: 1; gap: 20px; }
}
@media (max-width: 760px) {
  body { background: var(--night); }
  .site { width: 100%; margin: 0; border-left: 0; border-right: 0; }
  .brand img { width: 57px; height: 57px; }
  .nav { gap: clamp(13px,3vw,25px); overflow: auto; justify-content: flex-start; padding-bottom: 4px; }
  .nav a { font-size: 15px; }
  .choices { gap: 9px; padding: 12px; }
}
@media (max-width: 560px) {
  .header { padding: 8px 12px; }
  .brand-title { font-size: 17px; }
  .brand-by { font-size: 9px; }
  .nav { gap: 18px; }
}
/* Very narrow screens: allow the masthead name to wrap within its available width. */
@media (max-width: 350px) {
  .brand-title { white-space: normal; font-size: 16px; line-height: 1.12; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .choice, .nav a, .footer-links a { transition: none; }
}
