/* ==========================================================================
   Leading Edge Concepts — design tokens & base styles
   ========================================================================== */

:root {
  --color-bg: #faf7f2;
  --color-bg-alt: #f1ece3;
  --color-surface: #ffffff;
  --color-text: #2b2622;
  --color-text-muted: #6b6259;
  --color-accent: #a3714f;
  --color-accent-dark: #7d5439;
  --color-accent-soft: #e7d9cb;
  --color-line: #e3dbd0;
  --color-focus: #2b6cb0;

  --font-display: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;

  --container-max: 1200px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius-pill: 999px;
  --radius-md: 10px;
  --radius-lg: 28px;
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}

h1 { font-size: clamp(2.75rem, 6vw, 4.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 600; }

p { margin: 0 0 var(--space-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-1);
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.1rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

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

/* Skip link ------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--space-2);
  background: var(--color-accent-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  z-index: 200;
  transition: top var(--transition);
}
.skip-link:focus {
  top: var(--space-2);
}

/* Focus visibility -------------------------------------------------------
   Never remove outlines without a replacement. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform 140ms ease, box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.97); }

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(43, 38, 34, 0.05);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--color-accent-dark) 60%, transparent);
}
.btn--primary:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: none;
}

.btn--ghost {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-line);
}
.btn--ghost:hover { background: var(--color-line); }

.btn--outline {
  background: transparent;
  border-color: currentColor;
  color: var(--color-accent-dark);
}
.btn--outline:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn:disabled:hover {
  background: var(--color-bg-alt);
}

/* ==========================================================================
   Header / nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition),
    background var(--transition);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  border-bottom-color: var(--color-line);
  box-shadow: 0 8px 24px -18px rgba(43, 38, 34, 0.4);
}

.nav-toggle {
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle .icon-menu {
  transition: opacity 120ms ease;
}

/* Open state: the trigger picks up an ink border and the glyph swaps to
   a close mark — a small confirmation that answers the click. */
.nav-toggle[aria-expanded="true"] {
  background: var(--color-surface);
  border-color: var(--color-text);
}
.nav-toggle[aria-expanded="true"] .icon-menu {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='5' y1='5' x2='19' y2='19'/%3E%3Cline x1='19' y1='5' x2='5' y2='19'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='5' y1='5' x2='19' y2='19'/%3E%3Cline x1='19' y1='5' x2='5' y2='19'/%3E%3C/svg%3E");
}

/* Centered header wordmark removed per request. The element itself now
   gets the .visually-hidden treatment (via a class added in markup) rather
   than display:none, so the site name stays announced to screen readers. */

/* Nav menu: a crisp light panel anchored to the Menu button. Oversized
   sans labels, hairline-separated, each with a short plain-language note.
   A small square marks the section you're on / hovering. --------------- */
.nav-menu {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: max-content;
  min-width: 320px;
  max-width: min(88vw, 400px);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  box-shadow: 0 24px 50px -18px rgba(43, 38, 34, 0.22), 0 4px 10px -4px rgba(43, 38, 34, 0.1);
  padding: 0.4rem 0.6rem 0.15rem 0.9rem;
  z-index: 150;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 150ms var(--ease-smooth), transform 150ms var(--ease-smooth);
}

.nav-dropdown[data-open="true"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nav-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown ul li + li {
  border-top: 1px solid var(--color-line);
}

.nav-dropdown ul a {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 0.4rem;
  color: var(--color-text);
  position: relative;
  transition: color 140ms ease, transform 200ms var(--ease-smooth);
}

.nav-dropdown ul a::before {
  content: "";
  position: absolute;
  left: -0.55rem;
  top: 1.35rem;
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  transform: scale(0);
  transition: transform 160ms var(--ease-smooth);
}

.nav-dropdown ul a:hover,
.nav-dropdown ul a:focus-visible {
  color: var(--color-accent-dark);
  transform: translateX(8px);
  outline: none;
}
.nav-dropdown ul a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.nav-dropdown ul a:hover::before,
.nav-dropdown ul a:focus-visible::before,
.nav-dropdown ul a[aria-current="page"]::before {
  transform: scale(1);
}
.nav-dropdown ul a[aria-current="page"] {
  color: var(--color-accent-dark);
}

.nav-dropdown__name {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.35rem, 4.6vw, 1.55rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.nav-dropdown__note {
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

.nav-dropdown__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0.3rem 0.4rem 0.7rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-line);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.nav-dropdown__foot a {
  color: var(--color-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color 140ms ease;
}
.nav-dropdown__foot a:hover {
  color: var(--color-accent-dark);
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */

/* Anchor targets on the single-page site: offset the jump so the sticky
   header never covers the top of the section being scrolled to. */
#home,
#about,
#portfolio,
#process,
#contact {
  scroll-margin-top: 90px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 88px);
  position: relative;
  isolation: isolate;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-4) var(--space-4);
  position: relative;
  z-index: 1;
}

.hero__media {
  position: relative;
  z-index: 1;
  min-height: 360px;
  margin: var(--space-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(43, 38, 34, 0.3);
}

@media (min-width: 900px) {
  .hero__media {
    margin: var(--space-4) var(--space-4) var(--space-4) 0;
  }
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.12);
}

@media (max-width: 899px) {
  .hero__media img { transform: none; }
}

/* Kinetic headline — each line wipes up from behind its own baseline as
   part of the page-load choreography. The hidden state only applies once
   reveal.js has tagged the element, so no-JS / reduced-motion shows text. */
.hero__title {
  font-size: clamp(3rem, 8.5vw, 6.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-3);
}
/* The overflow:hidden mask that the line wipes up behind needs a little
   room below the baseline, or descenders (the g in "Leading Edge") get
   clipped. Pad the clip box, then pull the next line back up so the
   visual leading is unchanged. */
.hero__title-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.hero__title-line-inner {
  display: block;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.hero__title[data-reveal-onload] { opacity: 1; transform: none; }
.hero__title[data-reveal-onload] .hero__title-line-inner {
  transform: translateY(115%);
  transition: transform 900ms var(--ease-smooth);
}
.hero__title.is-visible .hero__title-line-inner { transform: translateY(0); }
.hero__title.is-visible .hero__title-line:nth-child(2) .hero__title-line-inner {
  transition-delay: 90ms;
}

.hero__subhead {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 32ch;
}

/* ==========================================================================
   About teaser (text-only, home page)
   ========================================================================== */

.about-teaser {
  max-width: 640px;
  text-align: center;
  margin-inline: auto;
  padding-block: var(--space-6);
}

.about-teaser p {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Full-width CTA photo band
   ========================================================================== */

.cta-photo {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
  height: clamp(320px, 45vw, 640px);
}

.cta-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 78%;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -24px rgba(43, 38, 34, 0.3);
}

/* ==========================================================================
   Split section (About blocks)
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-6);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
  .split--reverse .split__media { order: 2; }
}

.split__media {
  position: relative;
}

/* An offset outline that peeks out behind the photo — a small craft
   detail that keeps the image from sitting there as a plain rectangle. */
.split__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--color-accent) 70%, transparent);
  border-radius: var(--radius-lg);
  transform: translate(18px, 18px);
  pointer-events: none;
  z-index: -1;
}

.split__media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px -20px rgba(43, 38, 34, 0.22);
}

.split__media img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  height: auto;
}

.split__body p {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Services grid
   ========================================================================== */

.services {
  padding-block: var(--space-6);
  background: var(--color-bg-alt);
}

.services__header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-5);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 620px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 2px 12px -6px rgba(43, 38, 34, 0.12);
  transition: box-shadow 240ms var(--ease-smooth), transform 240ms var(--ease-smooth);
}

.service-card:hover,
.service-card:focus-within {
  box-shadow: 0 20px 40px -18px rgba(43, 38, 34, 0.28);
  transform: translateY(-2px);
}

.service-card .eyebrow { display: block; }

/* ==========================================================================
   Instagram feed (Elfsight embed, alongside the curated portfolio grid)
   ========================================================================== */

.instagram-feed {
  padding-block: var(--space-5) var(--space-6);
}

.instagram-feed__header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.instagram-feed__header h3 {
  margin-bottom: var(--space-2);
}

.instagram-feed__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  transition: color var(--transition);
}

.instagram-feed__link:hover {
  color: var(--color-accent);
}

/* Elfsight's widget renders inside an iframe/shadow tree we don't control,
   but round the outer container so it doesn't look like a hard-edged
   foreign block dropped into an otherwise soft, rounded page. */
.instagram-feed [class^="elfsight-app-"] {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ==========================================================================
   Page header (About / Portfolio / Contact)
   ========================================================================== */

.page-header {
  padding-block: var(--space-5) var(--space-4);
}

.page-header p {
  color: var(--color-text-muted);
  max-width: 60ch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.breadcrumb a:hover { color: var(--color-accent-dark); }
.breadcrumb span[aria-hidden="true"] { opacity: 0.5; }

/* ==========================================================================
   Portfolio grid
   ========================================================================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4) var(--space-3);
  padding-block: var(--space-3) var(--space-6);
}

@media (min-width: 640px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

.portfolio-item {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: none;
  box-shadow: 0 2px 12px -6px rgba(43, 38, 34, 0.12);
  transition: box-shadow 240ms var(--ease-smooth), transform 240ms var(--ease-smooth);
}

.portfolio-grid .portfolio-item:hover,
.portfolio-grid .portfolio-item:focus-visible {
  box-shadow: 0 24px 48px -20px rgba(43, 38, 34, 0.3);
  transform: translateY(-3px);
}

.portfolio-item__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.portfolio-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.portfolio-item:hover .portfolio-item__media img,
.portfolio-item:focus-visible .portfolio-item__media img {
  transform: scale(1.05);
}

.portfolio-item__caption {
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

/* ==========================================================================
   Portfolio project detail
   ========================================================================== */

.project-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding-block: var(--space-5) var(--space-4);
}

@media (min-width: 800px) {
  .project-hero {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    align-items: start;
  }
}

.project-hero p {
  color: var(--color-text-muted);
}

.project-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -24px rgba(43, 38, 34, 0.28);
}

@media (min-width: 800px) {
  .project-image { aspect-ratio: 21 / 9; }
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-line);
  margin-top: var(--space-4);
}

.project-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.project-nav__link .icon {
  transition: transform 180ms ease;
}

.project-nav__link:hover {
  color: var(--color-accent-dark);
}

.project-nav__link--prev { margin-right: auto; }
.project-nav__link--prev:hover .icon { transform: translateX(-3px); }
.project-nav__link--next { margin-left: auto; }
.project-nav__link--next:hover .icon { transform: translateX(3px); }

/* ==========================================================================
   Contact / booking page
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding-block: var(--space-3) var(--space-6);
}

/* Grid items default to min-width:auto, so a long unbreakable line (e.g. a
   service-rates row) can force this wider than its track and overflow the
   page. Let both columns shrink to fit. */
.contact-layout > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.contact-info {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  height: fit-content;
}

.contact-info dl {
  margin: var(--space-3) 0 0;
}

.contact-info dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

.contact-info dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.social-bar {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  list-style: none;
  padding: 0;
}

.social-bar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  color: var(--color-text-muted);
  opacity: 0.55;
  cursor: default;
}

/* Links are inert until real profile URLs exist — see .social-bar__icon
   above. If/when they become real <a> tags again, this hover restores
   the previous interactive treatment. */
a.social-bar__icon {
  opacity: 1;
  color: inherit;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
a.social-bar__icon:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
}

.service-rates {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  border-top: 1px solid var(--color-line);
}

.service-rates li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.95rem;
}

.service-rates li span:last-child {
  color: var(--color-text-muted);
  white-space: nowrap;
}

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

.form {
  display: grid;
  gap: var(--space-3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 560px) {
  .form-row--two { grid-template-columns: 1fr 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--color-text);
}

.field .hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--color-accent);
}

.field input:invalid[data-touched="true"],
.field select:invalid[data-touched="true"],
.field textarea:invalid[data-touched="true"] {
  border-color: #b3432b;
}

.field-error {
  font-size: 0.8rem;
  color: #b3432b;
  min-height: 1.1em;
}

/* Turnstile widget: reserve its height so the submit button doesn't jump
   when the challenge finishes rendering. */
.form .cf-turnstile {
  min-height: 65px;
}

.form-status {
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: 0.95rem;
  display: none;
}

.form-status[data-state="success"] {
  display: block;
  background: #e7f1e6;
  color: #35603a;
}

.form-status[data-state="error"] {
  display: block;
  background: #f7e4df;
  color: #8a2f1c;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #24211d;
  color: #d9d2c8;
  padding-block: var(--space-5);
}

.site-footer a {
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 200ms ease, color var(--transition);
}
.site-footer a:hover {
  color: #fff;
  background-size: 100% 1px;
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-grid h4 {
  color: #fff;
  font-size: 1.2rem;
}

.footer-grid nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: #a89e90;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
}

/* ==========================================================================
   Icon set (mask-based, inherits currentColor)
   ========================================================================== */

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  flex-shrink: 0;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-menu {
  font-size: 1.1em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E");
}

.icon-instagram {
  font-size: 1.15em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.2' cy='6.8' r='1.1' fill='black' stroke='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.2' cy='6.8' r='1.1' fill='black' stroke='none'/%3E%3C/svg%3E");
}

.icon-facebook {
  font-size: 1.15em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='none'%3E%3Cpath d='M15 3h-2.5C10.02 3 8.5 4.6 8.5 7.2V10H6v3.4h2.5V21h3.4v-7.6h2.6l.5-3.4h-3.1V7.5c0-.9.3-1.5 1.6-1.5H15V3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='none'%3E%3Cpath d='M15 3h-2.5C10.02 3 8.5 4.6 8.5 7.2V10H6v3.4h2.5V21h3.4v-7.6h2.6l.5-3.4h-3.1V7.5c0-.9.3-1.5 1.6-1.5H15V3z'/%3E%3C/svg%3E");
}

.icon-arrow-left {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E");
}

.icon-arrow-right {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Scroll-reveal motion
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-smooth), transform 900ms var(--ease-smooth);
}

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

/* On-load hero reveal: same feel, fires on a stagger shortly after paint
   rather than on scroll intersection. */
[data-reveal-onload] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms var(--ease-smooth), transform 800ms var(--ease-smooth);
}
[data-reveal-onload].is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* The hero image is excluded — it carries a scroll parallax instead. */
[data-reveal-onload]:not(.hero__media).is-visible img {
  transform: scale(1);
}
[data-reveal-onload]:not(.hero__media) img {
  transform: scale(1.04);
  transition: transform 1000ms var(--ease-smooth);
}

/* Media gets an extra gentle scale-in so images feel like they're settling
   into place rather than just appearing. */
[data-reveal] img,
[data-reveal-group] img {
  transform: scale(1.04);
  transition: transform 900ms var(--ease-smooth);
}
[data-reveal].is-visible img,
[data-reveal-group].is-visible img {
  transform: scale(1);
}

/* Staggered children within a revealed group */
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-smooth), transform 900ms var(--ease-smooth);
}
[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 110ms; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 220ms; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 330ms; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 440ms; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 550ms; }

/* ==========================================================================
   Utility: reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-reveal-onload],
  [data-reveal-group] > *,
  .hero__title-line-inner {
    opacity: 1 !important;
    transform: none !important;
  }

  .process__steps::before { transform: none !important; }

  .split__media img,
  .hero__media img {
    transform: none !important;
  }
}

/* ==========================================================================
   Paper grain — a fine material tooth over the whole page
   ========================================================================== */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ==========================================================================
   Credibility figures (within About)
   ========================================================================== */

.figures {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-block: var(--space-4) var(--space-6);
  text-align: center;
}

@media (min-width: 720px) {
  .figures { grid-template-columns: repeat(3, 1fr); }
  .figures .figure + .figure { border-left: 1px solid var(--color-line); }
}

.figure__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-accent-dark);
}

.figure__label {
  display: block;
  margin: var(--space-1) auto 0;
  max-width: 22ch;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Statement — the brand's own line, given room
   ========================================================================== */

.statement {
  background: #2b211b;
  color: var(--color-bg);
  border-radius: var(--radius-lg);
  margin-inline: var(--space-3);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 5rem);
  text-align: center;
}

.statement__quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.8vw, 2.9rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 30ch;
  margin: 0 auto var(--space-4);
  color: #fff;
}

.statement .btn--primary {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: none;
}
.statement .btn--primary:hover {
  background: #fff;
  color: var(--color-text);
}

/* ==========================================================================
   Process — a real four-step sequence, connected by a drawn hairline
   ========================================================================== */

.process {
  padding-block: var(--space-6);
}

.process__header {
  max-width: 640px;
  margin-bottom: var(--space-5);
}

.process__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
  position: relative;
}

.process__step { position: relative; }

.process__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-accent);
  color: var(--color-accent-dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-2);
  position: relative;
  z-index: 1;
}

.process__step h3 { margin-bottom: var(--space-1); }
.process__step p {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  margin: 0;
}

/* Mobile: a vertical hairline that draws itself downward through the numbers */
@media (max-width: 799px) {
  .process__steps::before {
    content: "";
    position: absolute;
    left: 1.2rem;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 2px;
    background: var(--color-line);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1400ms var(--ease-smooth);
  }
  .process__steps.is-visible::before { transform: scaleY(1); }
}

/* Desktop: horizontal hairline drawing left-to-right behind the numbers */
@media (min-width: 800px) {
  .process__steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
  }
  .process__steps::before {
    content: "";
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    right: 1.2rem;
    height: 2px;
    background: var(--color-line);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1400ms var(--ease-smooth);
  }
  .process__steps.is-visible::before { transform: scaleX(1); }
}

/* ==========================================================================
   Portfolio rail — a drag-through gallery of recent work
   ========================================================================== */

.portfolio-grid.portfolio-rail {
  display: flex;
  grid-template-columns: none;
  gap: var(--space-3);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding-block: var(--space-3) var(--space-4);
  padding-inline: max(var(--space-3), calc((100% - var(--container-max)) / 2 + var(--space-3)));
  scrollbar-width: thin;
  scrollbar-color: var(--color-line) transparent;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.portfolio-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.portfolio-rail::-webkit-scrollbar { height: 6px; }
.portfolio-rail::-webkit-scrollbar-track { background: transparent; }
.portfolio-rail::-webkit-scrollbar-thumb {
  background: var(--color-line);
  border-radius: 999px;
}

.portfolio-rail .portfolio-item {
  flex: 0 0 clamp(258px, 74vw, 380px);
  scroll-snap-align: start;
}

/* ==========================================================================
   Magnetic buttons — the two lead CTAs ease toward the cursor
   ========================================================================== */

[data-magnetic] {
  transition: transform 260ms var(--ease-smooth), background var(--transition),
    color var(--transition), box-shadow var(--transition);
}

/* ==========================================================================
   Scroll parallax on the About photo
   Declared here, after the scroll-reveal rules, so it wins the cascade
   over [data-reveal].is-visible img (equal specificity, later source).
   ========================================================================== */

.split--reverse .split__media img {
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.06);
}
