/* =====================================================================
   Amelia Liddell Photography
   Equestrian & Wedding Photography · Near Ludlow, Shropshire
   Design system + styles
   ===================================================================== */

/* ---------- Self-hosted handwritten logo font ---------- */
@font-face {
  font-family: "Sacramento";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/sacramento.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  /* Palette — warm sage / cream, taken from Amelia's brand */
  --paper:        #f6f3ec;   /* page background, soft cream */
  --paper-2:      #efebe0;   /* alternating section / cards */
  --sage:         #d9d7c7;   /* brand greige-sage */
  --sage-deep:    #6f7361;   /* deep sage, headings on light */
  --olive:        #4b4f3e;   /* darkest green, footer / accents */
  --ink:          #2b2a26;   /* primary text */
  --ink-soft:     #565449;   /* secondary text */
  --gold:         #a98b5d;   /* warm metallic accent */
  --gold-soft:    #c9b48e;
  --line:         #cdc8b8;   /* hairlines */
  --white:        #ffffff;

  /* Typography */
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body:    "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --script:  "Sacramento", "Brush Script MT", cursive;

  /* Layout */
  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--body);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.08; color: var(--ink); }
.display {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  letter-spacing: 0.5px;
}
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  margin-bottom: 1.1rem;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); font-weight: 300; }
p + p { margin-top: 1.1rem; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.bg-paper-2 { background: var(--paper-2); }
.bg-sage { background: var(--sage); }
.bg-olive { background: var(--olive); color: var(--paper); }
.center { text-align: center; }
.measure { max-width: 60ch; }
.measure-narrow { max-width: 44ch; }
.mx-auto { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 1rem 1.9rem; border-radius: var(--radius);
  transition: all 0.4s var(--ease); cursor: pointer; white-space: nowrap;
}
.btn--solid { background: var(--olive); color: var(--paper); }
.btn--solid:hover { background: var(--ink); transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--white); }
.btn--gold:hover { background: var(--ink); transform: translateY(-2px); }
.btn--ghost { border: 1px solid currentColor; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--light { border: 1px solid rgba(255,255,255,0.7); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--ink); }
.btn--block { width: 100%; justify-content: center; }

.textlink {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  border-bottom: 1px solid var(--gold); padding-bottom: 3px; color: var(--ink);
  transition: all 0.3s var(--ease);
}
.textlink:hover { color: var(--gold); letter-spacing: 0.2em; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--gutter);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.site-header.scrolled {
  background: rgba(246,243,236,0.94);
  backdrop-filter: blur(10px);
  padding-block: 0.9rem;
  box-shadow: 0 1px 0 var(--line);
}
.brand {
  display: inline-block; color: var(--white); line-height: 1; transition: color 0.4s var(--ease);
}
.brand__name {
  display: block; font-family: var(--script); text-transform: none; font-weight: 400;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem); letter-spacing: 0.5px;
}
.brand small { display: block; font-family: var(--body); font-size: 0.56rem; letter-spacing: 0.36em; text-transform: uppercase; opacity: 0.85; margin-top: -4px; padding-left: 4px; font-weight: 400; }
.scrolled .brand { color: var(--ink); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.1rem); }
.nav a {
  font-size: 0.74rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.92); transition: color 0.3s var(--ease); position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0; background: var(--gold);
  transition: width 0.3s var(--ease);
}
.nav a:hover::after { width: 100%; }
.scrolled .nav a { color: var(--ink-soft); }
.scrolled .nav a:hover { color: var(--ink); }
.nav .btn { padding: 0.7rem 1.3rem; color: var(--white); border-color: rgba(255,255,255,0.8); }
.scrolled .nav .btn { background: var(--olive); color: var(--paper); border-color: var(--olive); }

.nav-toggle { display: none; width: 30px; height: 22px; position: relative; z-index: 110; }
.nav-toggle span { position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--white); transition: all 0.35s var(--ease); }
.scrolled .nav-toggle span, .nav-open .nav-toggle span { background: var(--ink); }
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 18px; }
.nav-open .nav-toggle span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: var(--white); }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,20,16,0.60) 0%, rgba(20,20,16,0.22) 38%, rgba(20,20,16,0.62) 100%);
}
.hero__inner { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.hero h1 { color: var(--white); max-width: 16ch; text-shadow: 0 2px 30px rgba(0,0,0,0.45); }
.hero .eyebrow { text-shadow: 0 1px 16px rgba(0,0,0,0.75), 0 0 3px rgba(0,0,0,0.55); }
.hero__sub { text-shadow: 0 1px 14px rgba(0,0,0,0.6); }
.hero__sub {
  margin-top: 1.4rem; font-size: 0.82rem; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 400;
  color: rgba(255,255,255,0.92);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,255,255,0.8);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.hero__scroll::after { content: ""; width: 1px; height: 38px; background: rgba(255,255,255,0.6); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 0.3; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- Intro strip ---------- */
.intro { text-align: center; }
.intro .display-sm { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.25; color: var(--ink); }
.intro .display-sm em { font-style: italic; color: var(--sage-deep); }

/* ---------- Split (about) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.split__media .tag {
  position: absolute; bottom: -1px; left: -1px; background: var(--paper); padding: 0.9rem 1.4rem;
  font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--sage-deep);
}
.signature { font-family: var(--display); font-style: italic; font-size: 1.9rem; color: var(--sage-deep); margin-top: 1.4rem; }

/* ---------- Section heads ---------- */
.sec-head { max-width: 64ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head.center { margin-inline: auto; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); }
.service {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.service:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(43,42,38,0.35); }
.service__media { aspect-ratio: 3/4; overflow: hidden; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.service:hover .service__media img { transform: scale(1.06); }
.service__body { padding: 1.8rem 1.7rem 2rem; display: flex; flex-direction: column; flex: 1; }
.service__body h3 { margin-bottom: 0.6rem; }
.service__badge { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem; }
.service__body p { color: var(--ink-soft); font-size: 0.98rem; flex: 1; }
.service__body .textlink { margin-top: 1.4rem; align-self: flex-start; }

/* ---------- Gallery grid ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.gallery-grid a { position: relative; overflow: hidden; border-radius: var(--radius); display: block; }
.gallery-grid img { width: 100%; height: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform 0.9s var(--ease); }
.gallery-grid a:nth-child(1) { grid-row: span 2; }
.gallery-grid a:nth-child(1) img { aspect-ratio: auto; height: 100%; }
.gallery-grid a:hover img { transform: scale(1.07); }
.gallery-grid a::after {
  content: "View gallery"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(43,42,38,0.32); color: var(--white); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.gallery-grid a:hover::after { opacity: 1; }

/* ---------- Portal callout ---------- */
.portal { position: relative; color: var(--white); text-align: center; overflow: hidden; }
.portal__media { position: absolute; inset: 0; z-index: -2; }
.portal__media img { width: 100%; height: 100%; object-fit: cover; }
.portal::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(33,34,28,0.62); }
.portal h2 { color: var(--white); }
.portal .lede { color: rgba(255,255,255,0.9); }

/* ---------- Steps (how booking works) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 3vw, 2.4rem); counter-reset: step; }
.step { }
.step__n {
  font-family: var(--display); font-size: 2.6rem; color: var(--gold); line-height: 1; display: block; margin-bottom: 0.8rem;
}
.step h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.4rem); }
.quote {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem 2rem;
  display: flex; flex-direction: column;
}
.quote__mark { font-family: var(--display); font-size: 3.5rem; line-height: 0.5; color: var(--gold-soft); height: 1.4rem; }
.quote p { font-style: normal; color: var(--ink); font-size: 1rem; flex: 1; }
.quote cite { margin-top: 1.4rem; font-style: normal; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }

/* ---------- Booking / enquiry ---------- */
.booking { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 1rem; font-weight: 300; color: var(--ink);
  padding: 0.85rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); }
.booking__aside { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem); }
.booking__aside ul { list-style: none; display: grid; gap: 1.1rem; margin-top: 1.4rem; }
.booking__aside li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; font-size: 0.96rem; color: var(--ink-soft); }
.booking__aside li b { color: var(--ink); font-weight: 500; }
.tick { width: 22px; height: 22px; border-radius: 50%; background: var(--olive); color: var(--paper); display: grid; place-items: center; font-size: 0.7rem; margin-top: 2px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 1.4rem; }

/* ---------- Contact strip ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.contact-card { text-align: center; padding: 2.2rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.contact-card .label { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.contact-card .value { font-family: var(--display); font-size: 1.4rem; margin-top: 0.6rem; color: var(--ink); word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--olive); color: rgba(255,255,255,0.85); padding-block: clamp(3.5rem, 6vw, 5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.footer-brand { font-family: var(--body); font-size: 1.1rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--white); }
.footer-brand small { display: block; font-size: 0.62rem; letter-spacing: 0.28em; margin-top: 6px; opacity: 0.8; }
.site-footer p { font-size: 0.92rem; margin-top: 1rem; max-width: 36ch; color: rgba(255,255,255,0.75); }
.footer-col h5 { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 1.1rem; font-family: var(--body); font-weight: 500; }
.footer-col ul { list-style: none; display: grid; gap: 0.7rem; }
.footer-col a { font-size: 0.92rem; color: rgba(255,255,255,0.8); transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--white); }
.footer-bottom { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,0.15); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.78rem; color: rgba(255,255,255,0.6); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,20,16,0.92); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: var(--radius); }
.lightbox__close { position: absolute; top: 1.5rem; right: 2rem; color: var(--white); font-size: 2rem; line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 1.8rem;
    background: var(--paper); transform: translateX(100%); transition: transform 0.5s var(--ease); }
  .nav-open .nav { transform: none; }
  .nav a { color: var(--ink) !important; font-size: 1rem; letter-spacing: 0.2em; }
  .nav .btn { background: var(--olive); color: var(--paper); border-color: var(--olive); }
  .nav-toggle { display: block; }
  .services, .gallery-grid, .quotes, .steps, .contact-cards { grid-template-columns: 1fr 1fr; }
  .split, .booking, .footer-grid { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .gallery-grid a:nth-child(1) { grid-row: span 1; }
  .gallery-grid a:nth-child(1) img { aspect-ratio: 1/1; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .services, .gallery-grid, .quotes, .steps, .contact-cards { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
}

/* =====================================================================
   ANIMATION LAYER
   ===================================================================== */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 120;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transition: width 0.1s linear;
}

/* Header drops in on load */
@keyframes navDrop { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.site-header { animation: navDrop 0.9s var(--ease) both; }

/* Hero: slow ken-burns + staggered content intro */
@keyframes kenburns { from { transform: scale(1.03); } to { transform: scale(1.12); } }
.hero__media img { animation: kenburns 22s ease-in-out infinite alternate; }
.hero__a { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.loaded .hero__a { opacity: 1; transform: none; }
.hero__a--1 { transition-delay: 0.15s; }
.hero__a--2 { transition-delay: 0.30s; }
.hero__a--3 { transition-delay: 0.45s; }

/* Marquee genre strip */
.marquee { overflow: hidden; background: var(--olive); padding: 0.95rem 0; white-space: nowrap; }
.marquee__track { display: inline-flex; animation: marquee 30s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--gold-soft); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Animated gold underline beneath centred section headings */
h2.reveal::after {
  content: ""; display: block; width: 58px; height: 2px; background: var(--gold);
  margin-top: 1.1rem; transform: scaleX(0); transform-origin: left center;
  transition: transform 0.9s var(--ease) 0.25s;
}
.center h2.reveal::after { margin-inline: auto; transform-origin: center; }
h2.reveal.in::after { transform: scaleX(1); }

/* Button sheen on hover */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg); transition: left 0.6s var(--ease); pointer-events: none;
}
.btn:hover::after { left: 150%; }

/* Portal parallax headroom */
.portal__media { will-change: transform; }
.portal__media img { height: 120%; }

/* Image hover lift for gallery + split media */
.split__media img { transition: transform 0.8s var(--ease); }
.split__media:hover img { transform: scale(1.03); }

/* Services: four-up */
.services--4 { grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
@media (max-width: 900px) { .services--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services--4 { grid-template-columns: 1fr; } }

/* Respect reduced-motion for the new infinite animations */
@media (prefers-reduced-motion: reduce) {
  .hero__media img, .marquee__track, .site-header { animation: none !important; }
  .hero__a { opacity: 1 !important; transform: none !important; }
  h2.reveal::after { transform: scaleX(1) !important; }
}
