/*
 * Uinta Prints — leveled-up CSS
 * Design tokens, motion, depth, and a print-shop palette.
 */

/* -------------------------------------------------------------------------
   Self-hosted webfonts
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

/* -------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------- */
:root {
  /* Set in px by JS from .site-top height; fallback for anchor scroll-padding */
  --site-header-offset: 7rem;

  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --ink: #141210;
  --ink-soft: #3d3835;
  --muted: #5c5652;
  --line: rgba(20, 18, 16, 0.12);
  --line-strong: rgba(20, 18, 16, 0.22);

  --surface: #fffcf8;
  --surface-2: #f7f2eb;
  --elevated: #ffffff;

  --brand: #1b4d2f;
  --brand-hover: #143d26;
  --brand-soft: #e8f2eb;
  --brand-mid: #2d6b47;

  --accent: #c45c1a;
  --accent-soft: #fff4e8;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 18, 16, 0.05);
  --shadow-md: 0 4px 12px rgba(20, 18, 16, 0.07), 0 1px 3px rgba(20, 18, 16, 0.06);
  --shadow-lg: 0 12px 40px rgba(20, 18, 16, 0.1), 0 4px 12px rgba(20, 18, 16, 0.05);
  --shadow-brand: 0 4px 20px rgba(27, 77, 47, 0.28);

  --space-xs: 0.35rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.25rem;
  --space-2xl: 3.5rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.22s;
  --dur-slow: 0.45s;
}

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

html {
  /* Explicit px root so rem never tracks a shrunken UA % (fixes odd tablet/emulation text). */
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor scroll lands with #section top just below sticky header */
  scroll-padding-top: var(--site-header-offset);
}

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

::selection {
  background: var(--brand-soft);
  color: var(--ink);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  font-optical-sizing: auto;
  color: var(--ink-soft);
  background-color: var(--surface-2);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(232, 242, 235, 0.9), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 244, 232, 0.5), transparent 45%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  background-attachment: fixed;
}

/* Fixed backgrounds are unreliable/janky on many mobile browsers; use normal scroll. */
@media (max-width: 899px) {
  body {
    background-attachment: scroll;
  }
}

/* Center column (main + sticky bar) */
body > .skip-link + .site-top,
body > main {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(var(--space-lg), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-lg), env(safe-area-inset-right, 0px));
}

main {
  padding-bottom: max(var(--space-2xl), env(safe-area-inset-bottom, 0px));
  padding-top: var(--space-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: var(--space-sm) var(--space-md);
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
  outline: 3px solid var(--brand-mid);
  outline-offset: 2px;
}

/* Sticky top bar */
.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  max-width: 46rem;
  margin: 0 auto;
  padding: max(var(--space-md), env(safe-area-inset-top, 0px)) var(--space-lg) var(--space-sm);
  background: rgba(255, 252, 248, 0.82);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition:
    padding var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.site-top__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-bottom: var(--space-xs);
}

.site-top__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.site-top__lang {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--muted);
}

.site-top__lang-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.site-top__lang-link:hover {
  color: var(--ink-soft);
}

.site-top__lang-link:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

.site-top__lang-current {
  color: var(--muted);
  font-weight: 600;
}

.site-top__lang-sep {
  margin: 0 0.35em;
  color: var(--muted);
  opacity: 0.55;
  font-weight: 400;
  user-select: none;
}

header {
  margin: 0;
  padding: 0;
  border-bottom: none;
  flex: 1 1 auto;
  min-width: 0;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  transition:
    background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out);
}

.social-links a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.social-links a:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

.social-links svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  overflow: visible;
}

/* :visited beats plain header a in specificity; keep logo text ink, not link blue/purple */
header a,
header a:link,
header a:visited {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.6rem);
  font-weight: 700;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  transition:
    color var(--dur) var(--ease-out),
    font-size var(--dur) var(--ease-out);
}
header a:hover {
  color: var(--brand);
}

nav {
  margin: var(--space-sm) 0 0;
  padding: 0;
}
nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
}
nav a {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-full);
  background: transparent;
  transition:
    background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
nav a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}
nav a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Narrow viewports: shorter sticky header after scrolling to free vertical space */
@media (max-width: 1024px) {
  .site-top.site-top--compact {
    padding-top: max(0.25rem, env(safe-area-inset-top, 0px));
    padding-bottom: 0.1rem;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    box-shadow: 0 1px 0 rgba(20, 18, 16, 0.06);
  }

  .site-top.site-top--compact .site-top__bar {
    padding-bottom: 0;
    gap: var(--space-sm);
  }

  .site-top.site-top--compact nav {
    margin-top: 0.15rem;
  }

  .site-top.site-top--compact nav ul {
    gap: 0.15rem 0.35rem;
  }

  .site-top.site-top--compact header a,
  .site-top.site-top--compact header a:link,
  .site-top.site-top--compact header a:visited {
    font-size: clamp(1.05rem, 3vw, 1.32rem);
  }

  /* Must override later `nav a { min-height: 2.75rem }` or the bar stays tall */
  .site-top.site-top--compact nav a {
    min-height: 2.25rem;
    padding: 0.28em 0.5em;
    font-size: 0.82rem;
  }

  .site-top.site-top--compact .social-links a {
    width: 2.35rem;
    height: 2.35rem;
  }

  .site-top.site-top--compact .site-top__lang {
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-top {
    transition: none;
  }
}

/* Anchor targets sit below sticky header (pairs with html scroll-padding) */
#quote {
  margin-top: var(--space-2xl);
  scroll-margin-top: var(--site-header-offset);
}

#about {
  margin-top: var(--space-xl);
  scroll-margin-top: var(--site-header-offset);
}

/* About — team blurb + small placeholder image */
.about-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

@media (min-width: 960px) {
  .about-layout {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xl);
  }
}

.about-media {
  margin: 0;
  flex: 0 0 auto;
}

.about-media-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  line-height: 0;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.about-media-link:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 3px;
}

@media (hover: hover) {
  .about-media-link:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(45, 107, 71, 0.35);
  }
}

.about-media-link picture {
  display: block;
}

.about-media-link img {
  display: block;
  width: min(11rem, 100%);
  height: auto;
  border-radius: calc(var(--radius-md) - 1px);
}

.about-copy {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  visibility: visible;
  opacity: 1;
}

.about-copy p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.about-copy strong {
  color: var(--ink);
  font-weight: 700;
}

/* Quote — visual finale: headline + lede read as the “star” block before the form */
#quote .quote-header {
  margin-bottom: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 3px solid var(--brand-mid);
}

#quote .quote-header h2 {
  margin: 0 0 var(--space-sm);
  padding-top: 0;
  border-top: none;
  font-size: clamp(1.55rem, 3.8vw, 1.95rem);
  letter-spacing: -0.03em;
}

#quote .quote-lede {
  margin: 0;
  max-width: 38ch;
  font-size: 1.06rem;
  line-height: 1.55;
  color: var(--muted);
}

@media (min-width: 600px) {
  #quote .quote-lede {
    font-size: 1.1rem;
  }
}

/* Links (in-page) */
a {
  color: var(--brand-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease-out);
}
a:hover {
  color: var(--brand);
}
a:visited {
  color: #5a3d6e;
}
a:active {
  color: var(--ink);
}

/* Headings */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "opsz" 72;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.85rem, 5.5vw, 2.45rem);
  margin: 0 0 var(--space-md);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  margin: var(--space-xl) 0 var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line-strong);
}

#hero + section h2 {
  border-top: none;
  padding-top: 0;
  margin-top: var(--space-lg);
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 var(--space-xs);
}

/* Hero — background photo + readable overlay */
#hero {
  position: relative;
  isolation: isolate;
  margin: var(--space-xl) 0 var(--space-lg);
  padding: 0;
  min-height: 18rem;
  min-height: clamp(18rem, 52vh, 32rem);
  border: 1px solid rgba(20, 18, 16, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: rgba(255, 252, 248, 0.95);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
}

.hero-media-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform-origin: center 40%;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-media img {
    animation: hero-photo-drift 32s ease-in-out infinite alternate;
  }

  @keyframes hero-photo-drift {
    0% {
      transform: scale(1.06) translate3d(0, 0, 0);
    }
    100% {
      transform: scale(1.12) translate3d(-1.25%, -0.75%, 0);
    }
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #hero:hover .hero-media img {
    animation-play-state: paused;
  }

  .hero-media img {
    transition: filter var(--dur-slow) var(--ease-out);
  }

  #hero:hover .hero-media img {
    filter: brightness(1.07) saturate(1.04);
  }
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    165deg,
    rgba(12, 14, 12, 0.25) 0%,
    rgba(20, 18, 16, 0.55) 45%,
    rgba(10, 18, 14, 0.88) 100%
  );
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #hero:hover::after {
    opacity: 0.92;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--space-lg);
  max-width: 38rem;
  pointer-events: none;
}

.hero-content h1,
.hero-content p,
.hero-content a {
  pointer-events: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content > * {
    opacity: 0;
    animation: hero-content-in 0.85s var(--ease-out) forwards;
  }

  .hero-content > *:nth-child(1) {
    animation-delay: 0.06s;
  }

  .hero-content > *:nth-child(2) {
    animation-delay: 0.16s;
  }

  .hero-content > *:nth-child(3) {
    animation-delay: 0.26s;
  }

  .hero-content > *:nth-child(4) {
    animation-delay: 0.36s;
  }

  @keyframes hero-content-in {
    from {
      opacity: 0;
      transform: translate3d(0, 14px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }
}

#hero h1 {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

#hero p {
  margin: var(--space-sm) 0;
  max-width: 36ch;
  color: rgba(255, 252, 248, 0.92);
}

.hero-local {
  margin: 0.35rem 0 var(--space-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 252, 248, 0.88);
}

#hero .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: var(--space-sm);
  padding: 0.65em 1.2em;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--elevated) !important;
  text-decoration: none;
  background: linear-gradient(165deg, var(--brand-mid) 0%, var(--brand) 100%);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-brand);
  transition:
    transform var(--dur) var(--ease-spring),
    box-shadow var(--dur) var(--ease-out),
    filter var(--dur) var(--ease-out);
}

#hero .hero-cta__arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease-spring);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #hero .hero-cta:hover {
    color: var(--elevated) !important;
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.06);
    box-shadow: 0 10px 32px rgba(27, 77, 47, 0.38);
  }

  #hero .hero-cta:hover .hero-cta__arrow {
    transform: translateX(5px);
  }
}

@media (hover: hover) and (prefers-reduced-motion: reduce) {
  #hero .hero-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 8px 28px rgba(27, 77, 47, 0.35);
  }

  #hero .hero-cta:hover .hero-cta__arrow {
    transform: none;
  }
}

#hero .hero-cta:active {
  transform: scale(0.98);
  filter: brightness(0.97);
  box-shadow: 0 4px 16px rgba(27, 77, 47, 0.28);
  transition-duration: 0.08s;
}

#hero .hero-cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  #hero .hero-cta {
    min-height: 2.75rem;
    padding: 0.7em 1.35em;
  }
}

p {
  margin: 0.65rem 0;
}

strong {
  font-weight: 700;
}

small {
  font-size: 0.86em;
  color: var(--muted);
}

/* Product grid: intro rows span full width; cards tile 2–3 columns */
#products {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#products article {
  margin: var(--space-md) 0 0;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-slow) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

@media (min-width: 540px) {
  #products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
    align-items: stretch;
  }

  #products > h2 {
    grid-column: 1 / -1;
  }

  #products article {
    margin: 0;
  }
}

@media (min-width: 900px) {
  #products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Third card spans two columns so the 3-up row doesn’t leave a dead column */
  #products .products-card--wide {
    grid-column: span 2;
  }
}

/* Two-column layout: let the last card use full width */
@media (min-width: 540px) and (max-width: 899px) {
  #products .products-card--wide {
    grid-column: 1 / -1;
  }
}

#products article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(27, 77, 47, 0.2);
}

#products article h3 {
  margin-top: 0;
}

#products article > p:first-of-type strong {
  display: inline-block;
  margin: 0 0 var(--space-sm);
  padding: 0.35em 0.7em;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(27, 77, 47, 0.15);
  border-radius: var(--radius-full);
}

/* Gallery */
#our-work ul {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 480px) {
  #our-work ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 800px) {
  #our-work ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#our-work figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-slow) var(--ease-out);
}

#our-work figure:hover {
  box-shadow: var(--shadow-md);
}

#our-work a {
  font-weight: 600;
}

#our-work a.gallery-thumb-link {
  font-weight: 400;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#our-work a.gallery-thumb-link:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
  z-index: 1;
}

/* Cropped thumbnail: shorter on small screens so tiles don't eat the viewport */
.gallery-thumb {
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e8e4de 0%, #d4cfc7 100%);
}

@media (max-width: 599px) {
  .gallery-thumb {
    aspect-ratio: 16 / 9;
    /* Cap height on phones / small tablets so one tile doesn't dominate the screen */
    max-height: min(42vh, 260px);
  }
}

@media (min-width: 600px) {
  .gallery-thumb {
    aspect-ratio: 3 / 2;
    max-height: none;
  }
}

.gallery-thumb picture {
  display: block;
  width: 100%;
  height: 100%;
}

#our-work .gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--dur-slow) var(--ease-out);
}

#our-work figure:hover .gallery-thumb img {
  transform: scale(1.03) translateZ(0);
}

#our-work figcaption {
  flex: 0 0 auto;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--elevated);
}

@media (max-width: 1024px) {
  #our-work figcaption {
    font-size: 0.92rem;
  }
}

@media (max-width: 599px) {
  #our-work figcaption {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
  }
}

.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;
}

/* Form */
form {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

#quote form {
  margin-top: 0;
  transition:
    box-shadow var(--dur-slow) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

#quote form:focus-within {
  box-shadow: var(--shadow-lg);
  border-color: rgba(45, 107, 71, 0.22);
}

.quote-form .quote-fieldset > legend {
  font-size: 1.08rem;
  color: var(--brand);
}

.quote-fieldset > fieldset.quote-choice-fieldset {
  margin: var(--space-md) 0;
}

.label-optional {
  font-weight: 500;
  color: var(--muted);
}

.form-field small,
.quote-fieldset small {
  display: inline-block;
  margin-top: 0.15rem;
}

.field-error {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.9rem;
  font-weight: 600;
  color: #9a2c2c;
}

.field-error--fieldset {
  margin-top: var(--space-sm);
}

.quote-form-status {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
}

.quote-form-status:empty {
  display: none;
}

.quote-form-status:not(:empty) {
  display: block;
}

.quote-form-status--success {
  color: var(--ink);
  background: var(--brand-soft);
  border: 1px solid rgba(45, 107, 71, 0.35);
}

.quote-form-status--error {
  color: var(--ink);
  background: #fdeeee;
  border: 1px solid rgba(154, 44, 44, 0.35);
}

.quote-form-note {
  margin: var(--space-lg) 0 var(--space-md);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.quote-form .cf-turnstile {
  margin: var(--space-md) 0 var(--space-sm);
}

.quote-form-actions {
  margin-top: var(--space-md);
}

.quote-submit[aria-busy='true'] {
  cursor: wait;
  opacity: 0.92;
}

form p,
form fieldset {
  margin: var(--space-md) 0;
}

fieldset {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

legend {
  padding: 0 0.4em;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

label {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink-soft);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand-mid);
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
}

/* Quote form — choice chips (items checkboxes + artwork radios): large tap targets */
.quote-choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0;
}

.quote-choice-fieldset label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  min-height: 2.85rem;
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
  line-height: 1.35;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--elevated);
  transition:
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.quote-choice-fieldset label:has(:checked) {
  border-color: rgba(45, 107, 71, 0.55);
  background: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
  .quote-choice-fieldset label:hover {
    border-color: rgba(45, 107, 71, 0.45);
    background: var(--brand-soft);
    box-shadow: var(--shadow-sm);
  }
}

.quote-choice-fieldset input[type="checkbox"],
.quote-choice-fieldset input[type="radio"] {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  margin: 0.22em 0 0;
  vertical-align: middle;
}

/* Tablets + phones: larger choice targets (iPad ~820px was stuck between phone + desktop rules). */
@media (max-width: 1024px) {
  .quote-choice-fieldset label {
    min-height: 3.4rem;
    padding: 1rem 1.15rem;
    font-size: 1.05rem;
    gap: 0.85rem;
  }

  .quote-choice-fieldset input[type="checkbox"],
  .quote-choice-fieldset input[type="radio"] {
    width: 1.55rem;
    height: 1.55rem;
  }
}

@media (max-width: 400px) {
  .quote-choice-fieldset label {
    min-height: 3.55rem;
    padding: 1.05rem 1.2rem;
    font-size: 1.06rem;
  }

  .quote-choice-fieldset input[type="checkbox"],
  .quote-choice-fieldset input[type="radio"] {
    width: 1.6rem;
    height: 1.6rem;
  }
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="file"],
textarea,
select {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: var(--space-xs);
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: var(--elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition:
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(27, 77, 47, 0.35);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft), 0 0 0 5px var(--brand);
}

textarea {
  resize: vertical;
  min-height: 7rem;
}

/* At least 16px text on form controls; applies to tablets / iPad too. */
@media (max-width: 1024px) {
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="file"],
  textarea,
  select {
    font-size: max(1rem, 16px);
  }
}

button[type="submit"] {
  margin-top: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--elevated);
  background: linear-gradient(165deg, var(--brand-mid) 0%, var(--brand) 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition:
    transform var(--dur) var(--ease-spring),
    filter var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 8px 28px rgba(27, 77, 47, 0.4);
}

button[type="submit"]:active {
  transform: translateY(0);
}

/* FAQ */
/* Smooth open/close for native <details> (Chrome 131+, Safari 17.4+, etc.) */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }

  #faq details::details-content {
    transition:
      height var(--dur-slow) var(--ease-out),
      content-visibility var(--dur-slow) allow-discrete;
    overflow: clip;
  }

  #faq details:not([open])::details-content {
    height: 0;
  }

  #faq details[open]::details-content {
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  @supports (interpolate-size: allow-keywords) {
    #faq details::details-content {
      transition: none;
    }
  }
}

#faq details {
  margin: var(--space-sm) 0;
  padding: 0;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur-slow) var(--ease-out);
}

#faq details[open] {
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  padding: var(--space-md) var(--space-lg) var(--space-md) 2.75rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::before {
  content: "";
  position: absolute;
  left: var(--space-md);
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-65%) rotate(-45deg);
  transition: transform var(--dur-slow) var(--ease-spring);
}

#faq details[open] summary::before {
  transform: translateY(-25%) rotate(45deg);
}

#faq summary:hover {
  background: var(--brand-soft);
}

#faq details p {
  margin: 0;
  padding: 0 var(--space-lg) var(--space-md) 2.75rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: var(--space-md);
}

/* Footer — same max width and horizontal padding as .site-top / main */
footer {
  margin-top: var(--space-2xl);
  margin-left: auto;
  margin-right: auto;
  max-width: 46rem;
  padding: var(--space-xl) max(var(--space-lg), env(safe-area-inset-right, 0px))
    max(var(--space-xl), env(safe-area-inset-bottom, 0px)) max(var(--space-lg), env(safe-area-inset-left, 0px));
  color: rgba(255, 252, 248, 0.88);
  background: linear-gradient(165deg, #1a2e24 0%, var(--ink) 55%, #0d0c0b 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 40px rgba(20, 18, 16, 0.12);
}

footer a {
  color: #a8e0c0;
  font-weight: 600;
}
footer a:hover {
  color: #d4f5e4;
}

footer small {
  color: rgba(255, 252, 248, 0.55);
}

footer p {
  margin: 0.5rem 0;
}

.footer-social {
  margin: var(--space-md) 0;
}

.footer-social .social-links {
  justify-content: flex-start;
}

footer .social-links a {
  color: #a8e0c0;
}

footer .social-links a:hover {
  color: #d4f5e4;
  background: rgba(255, 255, 255, 0.08);
}

footer .social-links a:focus-visible {
  outline-color: #a8e0c0;
}

.footer-legal {
  margin-top: var(--space-md);
}

.footer-privacy-btn {
  margin: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: #a8e0c0;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-privacy-btn:hover {
  color: #d4f5e4;
}

.footer-privacy-btn:focus-visible {
  outline: 2px solid #a8e0c0;
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.5em 0.85em;
    font-size: 0.95rem;
  }

  .social-links a {
    width: 2.75rem;
    height: 2.75rem;
  }

  footer .social-links a {
    width: 2.75rem;
    height: 2.75rem;
  }

  .footer-privacy-btn {
    min-height: 2.75rem;
    padding: 0.35rem 0.5rem;
  }

  .quote-submit {
    min-height: 2.75rem;
    width: 100%;
  }
}

body.modal-open {
  overflow: hidden;
}

/* Privacy policy modal + nested data-deletion dialog + image lightbox */
.privacy-modal-overlay,
.delete-modal-overlay,
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(var(--space-md), env(safe-area-inset-top, 0px)) max(var(--space-md), env(safe-area-inset-right, 0px))
    max(var(--space-md), env(safe-area-inset-bottom, 0px)) max(var(--space-md), env(safe-area-inset-left, 0px));
  background: rgba(10, 12, 11, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.privacy-modal-overlay:not([hidden]),
.delete-modal-overlay:not([hidden]),
.image-lightbox-overlay:not([hidden]) {
  display: flex;
}

.delete-modal-overlay {
  z-index: 9100;
}

.image-lightbox-overlay {
  z-index: 9200;
  background: rgba(10, 12, 11, 0.88);
}

.image-lightbox-dialog {
  position: relative;
  max-width: min(92vw, 56rem);
  max-height: 90vh;
  max-height: 90dvh;
  margin: auto;
}

.image-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: min(85vh, 88vw);
  max-height: min(85dvh, 88vw);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.image-lightbox-close {
  position: absolute;
  top: max(var(--space-sm), env(safe-area-inset-top, 0px));
  right: max(var(--space-sm), env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: rgba(255, 252, 248, 0.95);
  background: rgba(20, 18, 16, 0.55);
  border: 1px solid rgba(255, 252, 248, 0.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out);
}

.image-lightbox-close:hover {
  background: rgba(255, 252, 248, 0.2);
  color: #fff;
}

.image-lightbox-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.privacy-modal-panel {
  position: relative;
  width: min(42rem, 100%);
  max-height: min(90vh, 52rem);
  max-height: min(90dvh, 52rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.privacy-modal-body {
  overflow-y: auto;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  -webkit-overflow-scrolling: touch;
}

.privacy-modal-body h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 var(--space-xs);
  padding-right: 2.5rem;
}

.privacy-modal-body h2 {
  font-size: 1.2rem;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.privacy-modal-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.privacy-modal-subtitle {
  color: var(--muted);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}

.privacy-modal-body p,
.privacy-modal-body li {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.privacy-modal-body a {
  color: var(--brand-mid);
  font-weight: 600;
}

.privacy-modal-close {
  position: absolute;
  top: max(var(--space-sm), env(safe-area-inset-top, 0px));
  right: max(var(--space-sm), env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out);
}

.privacy-modal-close:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.privacy-modal-close:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

.privacy-notice {
  border-left: 4px solid var(--ink);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.privacy-contact-block {
  margin-top: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.delete-modal-panel {
  width: min(28rem, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding: var(--space-xl);
  background: var(--elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.delete-modal-panel h2 {
  font-size: 1.2rem;
  margin: 0 0 var(--space-sm);
  border: none;
  padding: 0;
}

.delete-modal-lede {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 var(--space-md);
}

.delete-form-group {
  margin-bottom: var(--space-md);
}

.delete-form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
  color: var(--ink-soft);
}

.delete-form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

.delete-form-optional {
  font-weight: 400;
  color: var(--muted);
}

.delete-form-group input,
.delete-form-group select,
.delete-form-group textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--elevated);
  color: var(--ink);
}

.delete-form-group input:focus,
.delete-form-group select:focus,
.delete-form-group textarea:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.delete-form-group textarea {
  resize: vertical;
  min-height: 5rem;
}

.delete-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.delete-modal-actions--center {
  justify-content: center;
}

.delete-modal-confirm {
  text-align: center;
  padding: var(--space-sm) 0;
}

.delete-modal-confirm p {
  margin: var(--space-sm) 0;
  color: var(--ink-soft);
}

.privacy-btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.privacy-btn-primary {
  color: var(--elevated);
  background: var(--ink);
  border-color: var(--ink);
}

.privacy-btn-primary:hover {
  background: #333;
  border-color: #333;
  color: var(--elevated);
}

.privacy-btn-primary:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

.privacy-btn-secondary {
  color: var(--ink);
  background: var(--elevated);
  border-color: var(--ink);
}

.privacy-btn-secondary:hover {
  background: var(--surface-2);
}

@media (max-width: 480px) {
  .delete-modal-actions {
    flex-direction: column;
  }

  .delete-modal-actions .privacy-btn {
    width: 100%;
    text-align: center;
  }
}

@media print {
  .site-top {
    position: static;
    box-shadow: none;
  }
  .hero-media img {
    animation: none !important;
  }
  .hero-content > * {
    animation: none !important;
    opacity: 1 !important;
  }
  #hero,
  form,
  #our-work figure {
    box-shadow: none;
  }
  #our-work figure {
    content-visibility: visible;
  }
  .privacy-modal-overlay,
  .delete-modal-overlay,
  .image-lightbox-overlay {
    display: none !important;
  }
}
