/* ============================================================
   TOKENS — project-specific. Rewrite this file per client.
   "Form & Vow" — freelance wedding & event planning
   ============================================================ */

:root {
  /* ---- Color: 5 named values, chosen for this brief ----
     Evening-event palette: ink + parchment do the work of a
     neutral base, brass and wine are the two accents, mist is
     the quiet in-between for borders and secondary text. No
     blush pink, no script-font cliché — this is meant to read
     calm and organised, not precious. */
  --color-ink:        #1c1b22;  /* near-black, warm undertone — text, dark sections */
  --color-parchment:  #f6f1e6;  /* warm paper white — page background */
  --color-parchment-dim: #ece4d2; /* slightly deeper paper — alt section bg */
  --color-brass:       #a9824c;  /* muted brass-gold — primary accent, CTAs */
  --color-brass-dark:  #8a6a3a;  /* brass, pressed/hover state */
  --color-wine:        #5b2a2e;  /* deep wine — secondary accent, dark-section headings */
  --color-mist:         #8e8a7c;  /* warm grey — borders, captions, secondary text */
  --color-white:       #fffdf8;

  /* ---- Type: two roles, paired deliberately ----
     Fraunces (display) has soft, slightly wonky serif terminals —
     warmer and less formal than the high-contrast serif AI
     defaults reach for. Inter (body/UI) stays out of the way. */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ---- Spacing scale: fixed set, not ad hoc values ---- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* ---- Type scale ---- */
  --text-xs:  0.8125rem;
  --text-s:   0.9375rem;
  --text-m:   1.0625rem;
  --text-l:   1.375rem;
  --text-xl:  2rem;
  --text-2xl: 2.75rem;
  --text-3xl: clamp(2.5rem, 5vw, 4.25rem);

  /* ---- Layout ----
     container-pad uses clamp with a real floor — a flat vw
     value collapses too tight on narrow viewports. */
  --container-max: 1200px;
  --container-pad: clamp(1.5rem, 6vw, 5rem);
  --radius-s: 4px;
  --radius-m: 10px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
/* ============================================================
   BASE — reset + element defaults. Reusable as-is per project.
   ============================================================ */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-m);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-parchment);
  -webkit-font-smoothing: antialiased;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 600;
  text-wrap: balance;
}

p {
  max-width: 38em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-appearance: none;
}

ul, ol {
  list-style: none;
  padding: 0;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

label {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: 3px;
}

/* Visually-hidden but available to assistive tech (skip link target etc.) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* ============================================================
   LAYOUT — generic primitives. Reusable as-is per project.
   Check this file before writing fresh flex/grid for a new
   section: container, section, stack, cluster, split, grid-auto,
   grid-fixed-3.
   ============================================================ */

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

/* Vertical rhythm + background variants */
.section {
  padding-block: var(--space-2xl);
}

.section--tight {
  padding-block: var(--space-xl);
}

.section--alt {
  background: var(--color-parchment-dim);
}

.section--dark {
  background: var(--color-ink);
  color: var(--color-parchment);
}

/* Vertical spacing between children, no margin-collapsing surprises */
.stack {
  display: flex;
  flex-direction: column;
}

.stack > * + * {
  margin-top: var(--stack-gap, var(--space-m));
}

/* Horizontal wrapping group (nav links, tag lists, button rows) */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--space-m));
}

/* 50/50 two-column → collapses to stacked under 960px */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--split-gap, var(--space-2xl));
  align-items: center;
}

@media (max-width: 960px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split--reverse-mobile {
    display: flex;
    flex-direction: column-reverse;
  }
}

/* Self-wrapping card/image grid */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--grid-auto-min, 260px), 1fr));
  gap: var(--grid-gap, var(--space-l));
}

/* Locked 3-column grid (pricing tiers, fixed feature sets) */
.grid-fixed-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap, var(--space-l));
}

@media (max-width: 960px) {
  .grid-fixed-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .grid-fixed-3 {
    grid-template-columns: 1fr;
  }
}

/* Centered max-width text block, independent of .container padding */
.measure {
  max-width: 42em;
}

.measure--center {
  max-width: 42em;
  margin-inline: auto;
  text-align: center;
}
/* ============================================================
   COMPONENTS
   Mechanics (nav behaviour, button/card structure, form layout)
   are reusable. Colors, radius, and the hero/signature
   treatments below are Form & Vow's specific art direction —
   replace them when adapting for a new client.
   ============================================================ */

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -3rem;
  background: var(--color-ink);
  color: var(--color-parchment);
  padding: var(--space-2xs) var(--space-s);
  border-radius: var(--radius-s);
  transition: top 0.2s var(--ease-out);
  z-index: 100;
}

.skip-link:focus-visible {
  top: var(--space-s);
}

/* ---------- Nav ----------
   Bug fix: .nav__bar content and .nav__panel used to be separate
   sibling containers with no shared flex context, which threw the
   logo/links/CTA alignment off. .nav__inner is the single flex row
   that owns that alignment; .nav__panel is a distinct block-level
   dropdown that lives outside it, not a flex sibling pretending to
   align with it. */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-parchment);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.nav.is-scrolled {
  border-bottom-color: rgba(28, 27, 34, 0.08);
  box-shadow: 0 8px 24px -16px rgba(28, 27, 34, 0.25);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-block: var(--space-s);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-l);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav__bar {
  display: flex;
  align-items: center;
  gap: var(--space-l);
  flex: 1;
  justify-content: flex-end;
}

.nav__links {
  display: none;
  gap: var(--space-l);
}

@media (min-width: 961px) {
  .nav__links {
    display: flex;
  }
}

.nav__links a {
  font-size: var(--text-s);
  color: var(--color-ink);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--color-brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after {
  transform: scaleX(1);
}

/* Bug fix: a nav CTA reusing full .btn--primary looked too heavy
   at nav scale — this is a plain colored text link, not a button. */
.nav__cta {
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--color-wine);
  white-space: nowrap;
}

.nav__cta:hover {
  color: var(--color-ink);
}

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 22px;
}

@media (min-width: 961px) {
  .nav__toggle {
    display: none;
  }
}

.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-ink);
  transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav__panel {
  max-height: 0;
  overflow: hidden;
  background: var(--color-parchment);
  border-bottom: 1px solid rgba(28, 27, 34, 0.08);
  transition: max-height 0.3s var(--ease-out);
}

@media (min-width: 961px) {
  .nav__panel {
    display: none;
  }
}

.nav__panel.is-open {
  max-height: 70vh;
  overflow-y: auto;
}

.nav__panel-inner {
  padding-block: var(--space-m) var(--space-l);
}

.nav__panel-links {
  --stack-gap: var(--space-m);
}

.nav__panel-links a {
  font-size: var(--text-l);
  font-family: var(--font-display);
}

.nav__panel-cta {
  margin-top: var(--space-l);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.85em 1.6em;
  border-radius: var(--radius-s);
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.btn--primary {
  background: var(--color-brass);
  color: var(--color-white);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-brass-dark);
}

.btn--ghost {
  border: 1px solid currentColor;
  background: transparent;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(255, 253, 248, 0.08);
}

.btn--text {
  padding: 0;
  border-radius: 0;
  color: var(--color-wine);
  text-decoration: underline;
  text-decoration-color: rgba(91, 42, 46, 0.35);
  text-underline-offset: 0.2em;
}

.btn--text:hover {
  text-decoration-color: currentColor;
}

.section--dark .btn--text {
  color: var(--color-brass);
  text-decoration-color: rgba(169, 130, 76, 0.4);
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-wine);
}

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

/* ---------- Section heading group ---------- */
.section-head {
  --stack-gap: var(--space-s);
  margin-bottom: var(--space-l);
}

.section-head h2 {
  font-size: var(--text-2xl);
}

.section-head p {
  color: var(--color-mist);
  font-size: var(--text-l);
}

.section--dark .section-head p {
  color: rgba(246, 241, 230, 0.65);
}

/* ---------- Placeholder image block ----------
   Stand-in for real photography so the kit ships with no
   external image dependency. Swap the inner element for an
   <img> when real photos are ready; aspect-ratio is set on the
   wrapper so layout doesn't shift. */
.placeholder-img {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, var(--color-parchment-dim) 0%, #e3d8bd 100%);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.placeholder-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(28, 27, 34, 0.045) 0, rgba(28, 27, 34, 0.045) 1px, transparent 1px, transparent 14px);
}

.placeholder-img__caption {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink);
  opacity: 0.55;
  padding: var(--space-xs) var(--space-s);
}

/* A real <img> dropped into a placeholder fills the box edge-to-
   edge. Once it loads successfully (.has-photo, set by the inline
   onload handler in index.html), the gradient pattern and the
   "what goes here" caption hide themselves automatically. If the
   file is missing, onerror removes the broken <img> and the
   placeholder look shows through exactly as before. */
.placeholder-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-img.has-photo::before,
.placeholder-img.has-photo .placeholder-img__caption {
  display: none;
}

/* ---------- Hero ----------
   Structural risk: the text column sits inside the normal
   container padding, but the media column ignores it and runs
   flush to the viewport edge — a deliberate break from a centered
   hero-over-photo default. On mobile the media drops to a
   contained, full-width block above the fold instead of bleeding. */
.hero {
  background: var(--color-parchment);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 961px) {
  .hero__grid {
    grid-template-columns: minmax(0, 600px) 1fr;
    min-height: 680px;
  }
}

.hero__content {
  padding-inline: var(--container-pad);
  padding-block: var(--space-xl) var(--space-l);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  justify-content: center;
  order: 2;
}

@media (min-width: 961px) {
  .hero__content {
    padding-inline-end: var(--space-l);
    padding-block: var(--space-2xl);
    order: 1;
  }
}

.hero__media {
  order: 1;
  aspect-ratio: 4 / 3;
}

@media (min-width: 961px) {
  .hero__media {
    order: 2;
    aspect-ratio: auto;
    height: 100%;
  }
}

.hero h1 {
  font-size: var(--text-3xl);
  max-width: 14ch;
}

.hero__lede {
  font-size: var(--text-l);
  color: var(--color-mist);
  max-width: 32ch;
}

.hero__actions {
  margin-top: var(--space-xs);
  --cluster-gap: var(--space-l);
}

/* ---------- Signature element: thread-line ----------
   The one memorable element, used exactly once between the hero
   and the next section — a line drawing taut and tying a knot.
   Plain emphasis dividers elsewhere should use .rule, not this. */
.thread-line {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 420px;
  margin-inline: auto;
  padding-block: var(--space-xl);
}

.thread-line__segment {
  flex: 1;
  height: 1px;
  background: var(--color-brass);
  transform: scaleX(0);
  transition: transform 0.9s var(--ease-out);
}

.thread-line__segment--left {
  transform-origin: right center;
}

.thread-line__segment--right {
  transform-origin: left center;
}

.thread-line__knot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-inline: var(--space-xs);
  border-radius: 50%;
  background: var(--color-brass);
  transform: scale(0);
  transition: transform 0.5s var(--ease-out);
  transition-delay: 0.55s;
}

.thread-line.is-visible .thread-line__segment {
  transform: scaleX(1);
}

.thread-line.is-visible .thread-line__knot {
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .thread-line__segment,
  .thread-line__knot {
    transition: none;
    transform: none !important;
  }
}

/* Plain hairline divider for everyday use — not the signature element */
.rule {
  border: none;
  border-top: 1px solid rgba(28, 27, 34, 0.1);
}

.section--dark .rule {
  border-top-color: rgba(246, 241, 230, 0.15);
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border: 1px solid rgba(28, 27, 34, 0.08);
  border-radius: var(--radius-m);
  padding: var(--space-l);
}

.card--service {
  display: flex;
  flex-direction: column;
}

.card--service .card__label {
  font-family: var(--font-display);
  font-size: var(--text-l);
  margin-bottom: var(--space-2xs);
}

.card--service p {
  color: var(--color-mist);
  font-size: var(--text-s);
}

.card--service__list {
  margin-top: var(--space-s);
  padding-top: var(--space-s);
  border-top: 1px solid rgba(28, 27, 34, 0.08);
  font-size: var(--text-s);
  color: var(--color-ink);
}

.card--service__list li {
  position: relative;
  padding-left: var(--space-m);
  margin-top: var(--space-2xs);
}

.card--service__list li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-brass);
}

/* Services has exactly 3 cards. .grid-fixed-3's usual 2-up tablet
   step would split that into an uneven 2+1 row, so this skips
   straight from 3 columns to stacked instead. */
@media (max-width: 960px) {
  .services__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Process ----------
   This one genuinely is a sequence, so an ordered label is
   honest here — spelled out rather than boxed digits, so it
   doesn't read as the generic 01/02/03 default. */
.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-l);
}

@media (max-width: 960px) {
  .process__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .process__grid {
    grid-template-columns: 1fr;
  }
}

.process__step .eyebrow {
  margin-bottom: var(--space-2xs);
}

.process__step h3 {
  font-size: var(--text-l);
  margin-bottom: var(--space-2xs);
}

.process__step p {
  font-size: var(--text-s);
  color: var(--color-mist);
}

/* ---------- Gallery ---------- */
.gallery__item {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-s);
  overflow: hidden;
}

/* ---------- Testimonials ---------- */
.testimonial {
  position: relative;
  padding-top: var(--space-l);
}

.testimonial::before {
  content: '“';
  position: absolute;
  top: -0.6rem;
  left: -0.2rem;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-brass);
  opacity: 0.35;
  line-height: 1;
}

.testimonial blockquote {
  font-family: var(--font-display);
  font-size: var(--text-l);
  font-weight: 500;
}

.testimonial cite {
  display: block;
  margin-top: var(--space-s);
  font-style: normal;
  font-size: var(--text-s);
  color: var(--color-mist);
}

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-m);
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  --stack-gap: var(--space-2xs);
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(246, 241, 230, 0.7);
}

.field input,
.field textarea {
  background: rgba(246, 241, 230, 0.06);
  border: 1px solid rgba(246, 241, 230, 0.25);
  border-radius: var(--radius-s);
  padding: 0.75em 0.9em;
  color: var(--color-parchment);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(246, 241, 230, 0.4);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline-color: var(--color-brass);
  border-color: var(--color-brass);
}

/* ---------- Footer ---------- */
.footer {
  padding-block: var(--space-xl) var(--space-l);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-l);
}

@media (max-width: 960px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer h4 {
  font-size: var(--text-s);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: var(--space-s);
  font-family: var(--font-body);
  font-weight: 600;
}

.footer__links {
  --stack-gap: var(--space-2xs);
  font-size: var(--text-s);
  color: rgba(246, 241, 230, 0.75);
}

.footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-m);
  border-top: 1px solid rgba(246, 241, 230, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(246, 241, 230, 0.55);
}
