/* ==========================================================================
   Auburn Tarot & Astrology

   This stylesheet reproduces the structure of the original Squarespace site
   rather than reinterpreting it. The original is a full-bleed background-image
   site: almost every section is a photograph or gradient running edge to edge,
   with a tinted overlay on top of it and the content laid over that.

   The section model mirrors Squarespace's own, and the values come from the
   scrape in src/raw-html (see build/sections.py):

     theme    light | dark      which way the overlay and the text run
     overlay  0.00 – 1.00       how much of the tint sits over the photo
     height   small | medium    vertical padding preset
     width    narrow | medium | wide
     halign   left | center | right
     valign   top | middle | bottom
     focal    object-position for the background image

   FONTS: the original used LTC Bodoni 175 (display) and Proxima Nova (body),
   both Adobe Fonts served under *Squarespace's* licence, so they stop working
   off Squarespace. Free substitutes are in use. To restore the originals:
   create an Adobe Fonts web project, add its <link> in build/partials.py, then
   change --font-display and --font-body below.
   ========================================================================== */

:root {
  /* Colour, sampled from the live site's CSS */
  --paper:        #FAF9F4;
  --ink:          #432829;
  --ink-soft:     #6B4C4D;
  --cream:        #F4F2EC;
  --accent-light: #E8E8E5;
  --button-bg:    #FBFAF9;

  --font-display: "Bodoni Moda", "Didot", "Bodoni MT", Georgia, serif;
  --font-body:    "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --fs-h1: clamp(2.4rem, 5.6vw, 4.6rem);
  --fs-h2: clamp(1.85rem, 4vw, 3.16rem);
  --fs-h3: clamp(1.3rem, 2vw, 1.72rem);
  --fs-body: clamp(1.02rem, 1.3vw, 1.28rem);
  --fs-small: 0.92rem;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 6.4px;
  --header-h: 92px;
}

/* --- Reset ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.14;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 400; line-height: 1.55; }

p { margin: 0 0 1.35em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }

.prose a, .lede a, .card p a, .caption a, .service__body a {
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color 0.2s ease;
}
.prose a:hover, .lede a:hover, .card p a:hover,
.caption a:hover, .service__body a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: 0.75rem 1.25rem; z-index: 999; }
.skip:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   SECTION MODEL
   ========================================================================== */

.sec {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.sec__bg { position: absolute; inset: 0; z-index: -2; }

.sec__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focal, 50% 50%);
}

.sec__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--overlay-color);
  opacity: var(--overlay, 0);
}

.sec__inner {
  position: relative;
  width: 100%;
  padding-inline: var(--gutter);
  margin-inline: auto;
}

/* Themes -------------------------------------------------------------- */

/* Light: paper tint over the photograph, ink text. */
.sec--light { --overlay-color: var(--paper); color: var(--ink); }

/* Dark: ink tint over the photograph, cream text. */
.sec--dark  { --overlay-color: var(--ink);   color: var(--cream); }

/* A section with no background image sits on flat colour. */
.sec--solid-light { background: var(--paper); }
.sec--solid-dark  { background: var(--ink); color: var(--cream); }

.sec--dark .eyebrow, .sec--solid-dark .eyebrow { color: rgba(244, 242, 236, 0.66); }
.sec--dark .caption, .sec--solid-dark .caption { color: rgba(244, 242, 236, 0.7); }

/* Height presets — Squarespace's small/medium/large are padding presets, not
   viewport heights. Content determines the actual height. */
.sec--h-small  { padding-block: clamp(3rem, 6vw, 6rem); }
.sec--h-medium { padding-block: clamp(4.5rem, 10vw, 9.5rem); }
.sec--h-large  { padding-block: clamp(6rem, 16vw, 14rem); }

/* Content widths */
.sec--w-narrow .sec__inner { max-width: 760px; }
.sec--w-medium .sec__inner { max-width: 1000px; }
.sec--w-wide   .sec__inner { max-width: 1280px; }

/* Vertical alignment */
.sec--v-top    { align-items: flex-start; }
.sec--v-middle { align-items: center; }
.sec--v-bottom { align-items: flex-end; }

/* The header is fixed, so whatever comes first has to clear it. */
main > .sec:first-child { padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 3.5rem)); }

/* Horizontal alignment of the content within its column */
.sec--a-left   .sec__inner { text-align: left; }
.sec--a-center .sec__inner { text-align: center; }
.sec--a-right  .sec__inner { text-align: right; }
.sec--a-center .prose,
.sec--a-center .form { margin-inline: auto; }
.sec--a-right  .prose { margin-left: auto; }

/* Long-form prose reads badly centred, so opt back out where it matters. */
.sec__inner .text-left { text-align: left; }

.prose { max-width: 68ch; }

/* ==========================================================================
   HEADER
   ========================================================================== */

/* The original header is "dynamic": transparent over the first section, then
   solid once you scroll past it. Which colour it starts in depends on the
   theme of that first section, set per page via data-header on <body>. */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background: transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding: 0.75rem var(--gutter);
  max-width: 1440px;
  margin-inline: auto;
}

.brand { display: block; flex: 0 0 auto; }
.brand img { width: clamp(140px, 17vw, 200px); }

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 2rem); }

.nav a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.nav__ig svg { width: 18px; height: 18px; display: block; }

/* Colour at the top of the page */
body[data-header="light"] .site-header { color: var(--cream); }
body[data-header="dark"]  .site-header { color: var(--ink); }

/* The wordmark file is cream on transparent. Keep it as-is on dark, and
   recolour it to ink on light. */
body[data-header="dark"] .site-header .brand img,
body[data-header] .site-header.is-stuck .brand img { filter: var(--wordmark-ink); }

:root {
  --wordmark-ink: brightness(0) saturate(100%) invert(16%) sepia(18%)
                  saturate(1180%) hue-rotate(311deg) brightness(96%) contrast(89%);
}

/* Once scrolled past the first section.
   The body[data-header=...] rules above are more specific than a bare
   .is-stuck class would be, so this has to out-specify them or the nav stays
   cream-on-cream and disappears. */
body[data-header] .site-header.is-stuck {
  background: rgba(250, 249, 244, 0.985);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 rgba(67, 40, 41, 0.12);
  color: var(--ink);
}

@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; min-height: 0; gap: 0.5rem; }
  .nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 0.9rem; }
  .nav a { font-size: 0.7rem; letter-spacing: 0.12em; }
}

/* ==========================================================================
   HERO — the original's first section is the wordmark lockup as an image,
   not typeset text.
   ========================================================================== */

.hero-lockup {
  width: min(100%, 1180px);
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
}

.hero-lockup img { width: 100%; }

/* The homepage hero runs taller than the other sections. */
.sec--hero { min-height: min(94vh, 900px); }

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1;
  padding: 1.15rem 2.3rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--button-bg);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.btn--outline { background: transparent; border-color: currentColor; color: inherit; }
.btn--outline:hover { background: currentColor; }
.sec--dark .btn--outline:hover, .sec--solid-dark .btn--outline:hover { color: var(--ink); }
.sec--light .btn--outline:hover { color: var(--paper); }

.stack > * + * { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.mt-lg { margin-top: clamp(2rem, 4vw, 3.25rem); }

.lede {
  font-size: clamp(1.08rem, 1.6vw, 1.32rem);
  max-width: 62ch;
  margin-inline: auto;
}
.sec--a-left .lede { margin-inline: 0; }

.caption {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  font-style: italic;
  margin: -0.4rem 0 1.3rem;
}

/* Split (image beside text) ------------------------------------------- */

.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; text-align: left; }
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__media { order: 2; }
}
.split__media img { width: 100%; border-radius: var(--radius); }

/* Card grid ------------------------------------------------------------ */

.grid {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  text-align: left;
}

.card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.4rem;
}
.card h3 { margin-bottom: 0.4em; }
.card p { font-size: 1rem; }

/* Events --------------------------------------------------------------- */

.events { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.event img { width: 100%; max-width: 200px; aspect-ratio: 1; object-fit: contain; margin: 0 auto 1.2rem; }
.event p { font-size: 1rem; margin: 0; }
.event a { text-decoration: underline; text-underline-offset: 0.2em; }

/* Services ------------------------------------------------------------- */

.service {
  padding-block: clamp(1.9rem, 4vw, 2.6rem);
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  display: grid;
  gap: 0.8rem clamp(2rem, 5vw, 4rem);
  text-align: left;
}
@media (min-width: 880px) {
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); }
}

.service h3 { margin-bottom: 0.3em; }

.service__price {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}
.service__body p { font-size: 1.02rem; }
.service__note {
  font-size: var(--fs-small);
  opacity: 0.75;
  border-left: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  padding-left: 1rem;
}

/* Moon marks used as section dividers on the services page */
.moon { width: 54px; margin: 0 auto 1.75rem; opacity: 0.9; }

/* Testimonials --------------------------------------------------------- */

.quote-lead {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.45;
  font-weight: 400;
  font-style: italic;
  margin: 0 0 1.4rem;
  text-wrap: pretty;
}

.attrib {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.75;
}

.testimonial__media img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 1.3rem;
}
.testimonial h3 { font-size: 1.28rem; margin-bottom: 0.45em; }
.testimonial blockquote { margin: 0 0 1rem; font-size: 1rem; line-height: 1.75; }

/* Form ----------------------------------------------------------------- */

.form { max-width: 620px; text-align: left; }
.field { margin-bottom: 1.5rem; }

.field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
  background: rgba(251, 250, 249, 0.92);
  border: 1px solid rgba(67, 40, 41, 0.22);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
}
.field textarea { min-height: 165px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink);
}
.field--hp { position: absolute; left: -9999px; }

.form__status { margin-top: 1.1rem; font-size: 0.98rem; }
.form__status[data-state="error"] { color: #8B2C2C; }

/* Footer --------------------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--cream); padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.5rem; }
.site-footer a { border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: currentColor; }

.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  margin-bottom: 3rem;
}
.footer-grid h2 {
  font-family: var(--font-body);
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(244, 242, 236, 0.62); margin-bottom: 1.05rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.98rem; }
.footer-grid p { font-size: 0.98rem; }
.site-footer .brand img { width: 200px; margin-bottom: 1.3rem; }

.colophon {
  border-top: 1px solid rgba(244, 242, 236, 0.2);
  padding-top: 1.7rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem;
  font-size: 0.84rem; color: rgba(244, 242, 236, 0.7);
}

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
