/* ============================================================
   SQUIRE PRESS — VERSION 3.0
   Design System & Shared Styles
   Cormorant Garamond + DM Sans
   Ink Navy · Aged Vellum · Gold Leaf
   ============================================================ */

/* Google Fonts loaded per-page via <link> */

/* ─── Custom Properties ──────────────────────────────────────── */

:root {
  /* Colour Palette */
  --navy:         #0D1B2A;
  --navy-mid:     #152638;
  --navy-light:   #1E3550;
  --vellum:       #F5EFE0;
  --cream:        #FAF7F2;
  --gold:         #C9A84C;
  --gold-light:   #E2C16B;
  --gold-dim:     rgba(201, 168, 76, 0.15);
  --ink:          #1C1C1C;
  --ink-soft:     #3A3530;
  --muted:        #6B6052;
  --border-gold:  rgba(201, 168, 76, 0.28);
  --border-cream: rgba(245, 239, 224, 0.12);
  --border-ink:   rgba(28, 28, 28, 0.12);

  /* Typography */
  --serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  /* Layout */
  --section-v:    clamp(5rem, 10vw, 9rem);
  --container:    1200px;
  --container-pad: clamp(1.25rem, 5vw, 3rem);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:        0.3s ease;
  --t-slow:        0.5s ease;
}


/* ─── Reset & Base ───────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

input, textarea, button, select {
  font-family: inherit;
  font-size: inherit;
}


/* ─── Typography Scale ───────────────────────────────────────── */

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem,   4vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
h4 { font-size: 1.3rem; font-weight: 500; }
h5 { font-size: 1rem;   font-family: var(--sans); letter-spacing: 0.06em; }

p { line-height: 1.8; }

em, i { font-style: italic; }

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.eyebrow-dark {
  color: var(--muted);
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.8;
  color: var(--ink-soft);
}

.text-center { text-align: center; }
.text-white  { color: white; }


/* ─── Layout ─────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: 820px;
}

section {
  padding-block: var(--section-v);
}

.section-dark {
  background: var(--navy);
  color: white;
}

.section-vellum {
  background: var(--vellum);
}

.section-cream {
  background: var(--cream);
}


/* ─── Scroll Animations ──────────────────────────────────────── */

[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  0.85s var(--ease-out-expo),
    transform 0.85s var(--ease-out-expo);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate][data-delay="1"] { transition-delay: 0.08s; }
[data-animate][data-delay="2"] { transition-delay: 0.18s; }
[data-animate][data-delay="3"] { transition-delay: 0.28s; }
[data-animate][data-delay="4"] { transition-delay: 0.38s; }
[data-animate][data-delay="5"] { transition-delay: 0.5s; }


/* ─── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.9em 2.4em;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-base),
    transform 0.22s ease,
    box-shadow 0.22s ease;
  position: relative;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
}

/* Gold filled */
.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

/* Gold outline */
.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--navy);
}

/* White outline (for use on dark) */
.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: white;
  color: var(--navy);
  border-color: white;
}

/* Navy filled */
.btn-navy {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
}


/* ─── Site Header ─────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--container-pad);
  transition:
    background 0.45s var(--ease-in-out),
    border-color 0.45s ease,
    box-shadow 0.45s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: var(--navy);
  border-bottom-color: var(--border-gold);
  box-shadow: 0 4px 40px rgba(0,0,0,0.3);
}

.site-header.is-opaque {
  background: var(--navy);
  border-bottom-color: var(--border-gold);
}

/* Logo */
.header-logo {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
  text-decoration: none;
}

.header-logo-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.03em;
  transition: color var(--t-base);
}

.header-logo-name span { color: var(--gold); }

.header-logo-tagline {
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-top: 3px;
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--t-base);
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out-expo);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* CTA nav link */
.nav-cta {
  background: var(--gold) !important;
  color: var(--navy) !important;
  padding: 0.6em 1.5em;
  font-weight: 500 !important;
  transition: background var(--t-base), color var(--t-base) !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover  { background: var(--gold-light) !important; }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  z-index: 210;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: white;
  border-radius: 1px;
  transition: transform 0.35s ease, opacity 0.25s ease;
  transform-origin: center;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ─── Mobile Nav Overlay ─────────────────────────────────────── */

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 199;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  padding: 0.4rem 0;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    color 0.25s ease;
  text-decoration: none;
}

.mobile-nav.is-open a              { opacity: 1; transform: translateY(0); }
.mobile-nav.is-open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav.is-open a:nth-child(2) { transition-delay: 0.10s; }
.mobile-nav.is-open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-nav.is-open a:nth-child(4) { transition-delay: 0.20s; }
.mobile-nav.is-open a:nth-child(5) { transition-delay: 0.25s; }

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--gold);
}

/* Mobile nav ornament */
.mobile-nav-ornament {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--border-gold);
  margin: 1.5rem auto;
}


/* ─── Site Footer ─────────────────────────────────────────────── */

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding-top: 5rem;
  padding-bottom: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 2.5rem;
}

.footer-logo-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.footer-logo-name span { color: var(--gold); }

.footer-brand-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

.footer-col-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 1.4rem;
  display: block;
}

.footer-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-nav-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--t-base);
}

.footer-nav-links a:hover { color: white; }

.footer-contact-text {
  font-size: 0.88rem;
  line-height: 2;
}

.footer-contact-text a {
  color: var(--gold);
  transition: color var(--t-base);
}
.footer-contact-text a:hover { color: var(--gold-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

.footer-bottom a {
  color: rgba(255,255,255,0.3);
  transition: color var(--t-base);
}
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }


/* ─── Page Hero (interior pages) ─────────────────────────────── */

.page-hero {
  position: relative;
  background: var(--navy);
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding-top: 120px;
  padding-bottom: 5rem;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  filter: grayscale(0.3);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: white;
  margin-bottom: 1rem;
  font-style: italic;
}

.page-hero .lead {
  color: rgba(255,255,255,0.6);
  max-width: 580px;
}

.page-hero .eyebrow {
  margin-bottom: 1.25rem;
}


/* ─── Ornamental Divider ──────────────────────────────────────── */

.ornament {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-block: 2rem;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-gold);
}

.ornament-glyph {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.55;
  user-select: none;
}

.ornament-dark::before,
.ornament-dark::after {
  background: var(--border-cream);
}

.ornament-ink::before,
.ornament-ink::after {
  background: var(--border-ink);
}


/* ─── Gold Rule ───────────────────────────────────────────────── */

.gold-rule {
  width: 48px;
  height: 2px;
  background: var(--gold);
  display: block;
  margin-bottom: 1.5rem;
}


/* ─── Section Header Component ────────────────────────────────── */

.section-header {
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header .lead {
  max-width: 600px;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .lead {
  margin-inline: auto;
}

.section-header.centered .gold-rule {
  margin-inline: auto;
}


/* ─── Feature Block ───────────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.feature-grid.reverse {
  grid-template-columns: 2fr 1fr;
}

.feature-grid.reverse .feature-media {
  order: 2;
}


/* ─── Book Cover Shadow ───────────────────────────────────────── */

.book-shadow {
  box-shadow:
    0 4px 8px rgba(0,0,0,0.08),
    0 12px 32px rgba(0,0,0,0.14),
    0 24px 48px rgba(0,0,0,0.08);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.book-shadow:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow:
    0 8px 16px rgba(0,0,0,0.1),
    0 20px 48px rgba(0,0,0,0.18),
    0 40px 64px rgba(0,0,0,0.1);
}


/* ─── Pill/Badge ──────────────────────────────────────────────── */

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35em 0.9em;
  border: 1px solid var(--border-gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.badge-navy {
  border-color: var(--border-cream);
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
}


/* ─── Three-column grid ───────────────────────────────────────── */

.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}


/* ─── Card ─────────────────────────────────────────────────────── */

.card {
  padding: 2.5rem;
  background: var(--cream);
  border: 1px solid var(--border-ink);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-color: var(--gold);
}

.card-dark {
  background: var(--navy-mid);
  border-color: var(--border-gold);
  color: white;
}

.card-featured {
  border-top: 3px solid var(--gold);
}

.card h3 { margin-bottom: 0.5rem; }

.card .price {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  margin-block: 0.75rem 0.25rem;
}

.card .price-note {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.card-dark .price-note {
  color: rgba(255,255,255,0.45);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex: 1;
}

.card-list li {
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  line-height: 1.5;
}

.card-list li::before {
  content: '—';
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 0.05em;
}

.card-dark .card-list li { color: rgba(255,255,255,0.75); }

/* Stack card content vertically */
.card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Button full-width in card */
.card .btn { width: 100%; text-align: center; display: block; }


/* ─── Table ─────────────────────────────────────────────────────── */

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.styled-table th,
.styled-table td {
  text-align: left;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-ink);
}

.styled-table thead th {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0;
}

.styled-table tbody tr:last-child td { border-bottom: none; }

.styled-table tbody tr {
  transition: background var(--t-base);
}

.styled-table tbody tr:hover {
  background: rgba(201, 168, 76, 0.05);
}

.styled-table td strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.styled-table .price-col {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gold);
  white-space: nowrap;
}


/* ─── Form Styles ─────────────────────────────────────────────── */

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: white;
  border: 1px solid rgba(28,28,28,0.2);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink);
  transition: border-color var(--t-base), box-shadow var(--t-base);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.7;
}

.field-error {
  display: block;
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.form-success {
  background: #f0faf4;
  border: 1px solid #a3d9b5;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
}

.form-success h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: #1a5c3a;
  margin-bottom: 0.5rem;
}

.form-success p {
  font-size: 0.9rem;
  color: #1a5c3a;
  margin: 0;
}

.form-error {
  background: #fff5f5;
  border: 1px solid #f5a5a5;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #c0392b;
}

.form-error:empty { display: none; }

.form-submit {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--navy);
  color: var(--gold);
  border: 1px solid var(--navy);
  padding: 1rem 2rem;
  cursor: pointer;
  transition: background var(--t-base), color var(--t-base), transform 0.2s ease;
}

.form-submit:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}


/* ─── Responsive Breakpoints ──────────────────────────────────── */

@media (max-width: 960px) {
  .site-nav  { display: none; }
  .hamburger { display: flex; }

  .cols-3 {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid,
  .feature-grid.reverse {
    grid-template-columns: 1fr;
  }

  .feature-grid.reverse .feature-media {
    order: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --section-v: clamp(3.5rem, 8vw, 5.5rem);
  }

  .cols-3,
  .cols-2 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .page-hero {
    min-height: 36vh;
  }
}
