:root {
  --page: #f4f0e8;
  --surface: #faf9f6;
  --ink: #1e3329;
  --ink-soft: #5b6b62;
  --line: #ddd8ce;
  --brand: #1e3329;
  --on-brand: #fff;
  --radius: 2px;
  /* Picture corners by role: full-bleed pictures stay square. */
  --radius-card: 4px;
  --radius-product-card: 8px;
  --gutter: clamp(16px, 5vw, 80px);
  --font: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 300; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand); border-radius: var(--radius); font: 600 15px var(--font); cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: transparent; color: var(--brand); }
.btn-outline { background: transparent; color: var(--brand); padding: 8px 16px; font-size: 14px; }
.btn-outline:hover { background: var(--brand); color: var(--on-brand); }
.textlink { font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* Header */
.topbar { display: flex; justify-content: space-between; gap: 16px; padding: 6px var(--gutter); background: var(--page); font-size: 12.5px; color: var(--ink-soft); }
.topbar p { margin: 0; }
.topbar nav { display: flex; gap: 24px; }
.header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 40px; padding: 14px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 26px; font-weight: 700; letter-spacing: -0.04em; }
.wordmark span { color: #c2703d; }
.mainnav { display: flex; gap: 28px; font-weight: 500; flex: 1; }
.mainnav a:hover { color: var(--ink-soft); }

/* Media: a background tone until the picture arrives, then a soft fade. */
.media { position: relative; overflow: hidden; background: var(--tone, #d9d3c7); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease, transform 1.2s ease; }
.media img.is-loaded { opacity: 1; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: min(78vh, 760px); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 64px var(--gutter); background: var(--page); }
.mark { width: 64px; color: var(--brand); }
.hero h1 { font-size: clamp(40px, 4.4vw, 64px); line-height: 1.04; }
.hero-copy p { max-width: 460px; margin: 0; color: var(--ink-soft); font-size: 17px; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-media { position: relative; min-height: 520px; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1s ease; }
.slide.is-active { opacity: 1; }
.slide.is-active img { transform: scale(1.03); transition: opacity .6s ease, transform 7s linear; }
.slide::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, rgba(0,0,0,.45)); }
.slider-tabs { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 18px; display: flex; gap: 14px; }
.slider-tabs button { flex: 1; padding: 0 0 10px; text-align: left; color: #fff; background: none; border: 0; font: 500 13px var(--font); cursor: pointer; position: relative; opacity: .75; }
.slider-tabs button.is-active { opacity: 1; }
.slider-tabs button::before, .slider-tabs button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; }
.slider-tabs button::before { right: 0; background: rgba(255,255,255,.35); }
.slider-tabs button::after { width: 0; background: #fff; }
.slider-tabs button.is-active::after { animation: fill var(--interval, 6000ms) linear forwards; }
@keyframes fill { to { width: 100%; } }

/* Industry tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 4px; }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }
.tiles-2 { grid-template-columns: repeat(2, 1fr); }
.tile { aspect-ratio: 1 / 1.04; }
.tile span { position: absolute; z-index: 1; left: 20px; bottom: 18px; color: #fff; font-size: 20px; font-weight: 400; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.35)); }
.tile:hover img { transform: scale(1.04); }

/* Logo wall */
.logos { padding: 32px 0; display: grid; gap: 10px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
/* Rows follow the page scroll, alternating direction (main.js); they start offset so
   both directions have logos to reveal. */
.logo-row { display: flex; align-items: center; width: max-content; white-space: nowrap; will-change: transform; }
.lg { display: flex; align-items: center; justify-content: center; width: 190px; height: 76px; margin-right: 34px; color: #8a8f88; font-size: 22px; flex: none; }
.lg.boxed { background: #f1efea; }
.lg.serif { font-family: "Fraunces", Georgia, serif; font-style: italic; }
.lg.caps { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: 17px; }
.lg.wide { letter-spacing: .3em; }
.lg.bold { font-weight: 700; letter-spacing: -0.03em; }
.lg.mono { font-family: ui-monospace, Consolas, monospace; font-size: 19px; }
.lg.light { font-weight: 300; font-size: 26px; }

/* Products + auto-scrolling gallery */
.products { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 40px; padding: 72px 0 72px var(--gutter); background: var(--surface); align-items: start; }
.products h2 { margin-bottom: 28px; }
.catlist { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 6px; }
.catlist a { text-transform: uppercase; color: #7d837d; font-weight: 600; font-size: 15px; letter-spacing: .02em; transition: color .2s; }
.catlist a:hover { color: var(--ink); }
.marquee { overflow-x: auto; scrollbar-width: none; cursor: grab; }
.marquee::-webkit-scrollbar { display: none; }
.marquee-track { display: flex; align-items: flex-start; gap: 16px; width: max-content; }
.card { display: block; flex: none; }
.card .media { aspect-ratio: 3 / 4; border-radius: var(--radius-card); }
.card span { display: block; margin-top: 10px; font-size: 13.5px; }
.card.size-l { width: 465px; }
.card.size-m { width: 387px; }
.card.size-s { width: 310px; }
.card:hover img { transform: scale(1.03); }

/* Stories */
.stories { padding: 80px 0 88px var(--gutter); background: var(--page); }
.stories-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-right: var(--gutter); margin-bottom: 40px; }
.stories-head p { margin: 16px 0 28px; font-size: 17px; }
.arrows { display: flex; gap: 10px; }
.arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; }
.arrow:disabled { opacity: .35; cursor: default; }
.story-rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-right: var(--gutter); scroll-behavior: smooth; }
.story-rail::-webkit-scrollbar { display: none; }
.story { flex: none; width: clamp(260px, 26vw, 400px); scroll-snap-align: start; }
.story-img { display: block; aspect-ratio: 2 / 3; border-radius: var(--radius-card); }
.story h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 16px 0 6px; }
.story p { margin: 0; font-size: 14px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Hover: the photo eases in slightly inside its frame, the title is underlined. */
.story-img img { transition: opacity .6s ease, transform .7s cubic-bezier(.2, .6, .2, 1); }
.story h3 { text-decoration: underline transparent; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .3s ease; }
@media (hover: hover) {
  .story { cursor: pointer; }
  .story:hover .story-img img { transform: scale(1.04); }
  .story:hover h3 { text-decoration-color: currentColor; }
}
.story:focus-within .story-img img { transform: scale(1.04); }

/* Product card: product page "related", category grid. */
.rel { display: block; }
.rel .media { aspect-ratio: 1 / 1; border-radius: var(--radius-product-card); margin-bottom: 12px; }
.rel .meta { display: block; font-size: 12.5px; color: var(--ink-soft); }
.rel strong { display: block; margin-top: 4px; font-weight: 600; }
.rel:hover img { transform: scale(1.03); }

/* Page behind an open dialog stays still. */
html.is-locked { overflow: hidden; padding-right: var(--scrollbar, 0px); }
dialog { overscroll-behavior: contain; }

/* Partner accordion */
.partner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 88px var(--gutter); }
.partner p { font-size: 18px; max-width: 460px; }
.accordion details { border-top: 1px solid var(--line); }
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; display: flex; justify-content: space-between; padding: 18px 0; font-size: 18px; font-weight: 600; cursor: pointer; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-weight: 300; font-size: 24px; line-height: 1; transition: transform .3s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details > div { overflow: hidden; }
.accordion details > div p { margin: 0 0 20px; font-size: 15px; color: var(--ink-soft); }

/* CTA + footer */
.cta { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 40px var(--gutter); background: var(--page); flex-wrap: wrap; text-align: center; }
.cta h2 { font-size: clamp(24px, 2.4vw, 30px); }
.footer { padding: 48px var(--gutter) 28px; background: var(--surface); font-size: 14px; }
.footer-top { display: grid; grid-template-columns: auto 1fr minmax(240px, 300px); gap: 48px; align-items: start; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-cols h4 { margin: 0 0 12px; font-size: 14px; }
.footer-cols a { display: block; margin-bottom: 8px; color: var(--ink-soft); }
.newsletter { display: grid; gap: 10px; }
.newsletter input { padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; }
.footer-bottom { display: flex; gap: 24px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12.5px; }

/* Tablet and phone */
@media (max-width: 960px) {
  .mainnav { display: none; }
  .header { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 0; aspect-ratio: 4 / 5; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: 1fr; padding-right: 0; }
  .catlist { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-right: var(--gutter); }
  .card.size-l { width: 72vw; } .card.size-m { width: 60vw; } .card.size-s { width: 48vw; }
  .stories-head { flex-direction: column; align-items: flex-start; }
  .partner { grid-template-columns: 1fr; gap: 32px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .lg { width: 150px; height: 60px; margin-right: 20px; font-size: 18px; }
}
@media (max-width: 560px) {
  .topbar nav { display: none; }
  .hero-copy { padding: 40px var(--gutter); }
  .slider-tabs { gap: 8px; }
  .slider-tabs button { font-size: 11.5px; }
  .tile span { left: 12px; bottom: 10px; font-size: 16px; }
  .story { width: 72vw; }
}

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