/* ============================================================================
   Vilton Craft Overseas. The whole scheme is the :root block below and nothing
   else. No colour is written anywhere in this file, in any page, or in any
   inline style except as a var() reference, so the site is re-skinned by
   editing seven values.
   ========================================================================== */

:root {
  /* --- the palette. Every value measured; ratios noted. ------------------- */
  --paper:       #FFFBF3;              /* the ground                          */
  --ink:         #17130F;              /* body text            17.9:1 on paper */
  --muted:       rgba(23, 19, 15, 0.68);/* secondary text        6.2:1 on paper */
  --accent:      #FF5A1F;              /* FILLS and highlights  3.0:1 boundary */
  --accent-ink:  #17130F;              /* text ON accent        5.9:1          */
  --accent-text: #C43C08;              /* accent as SMALL TEXT  5.1:1 on paper */
  --accent-2:    #0A7A76;              /* supporting emphasis   5.0:1 on paper */
  --tint:        #FFEFE2;              /* card and panel fill                  */
  --line:        rgba(23, 19, 15, 0.14);/* hairlines and borders               */

  /* The vivid tangerine cannot carry small text on paper: it measures 3.0:1
     where 4.5:1 is required. So the accent has two stops of ONE hue, which is
     the sanctioned exception: --accent fills a shape and takes ink on top of
     it, --accent-text is the same hue darkened for type and links. Never set
     small type in --accent. */

  /* The case: photographs are mounted as dark plates on the bright page, the
     way prints are mounted on a gallery wall. This is the only dark surface in
     the scheme and it exists because the product photography is low-key and
     the travelling light needs an unlit state to be a change from. */
  --plate:       #100E0C;
  --plate-ink:   #F4EEE5;
  /* the travelling light's specular streak, on the dark plates only */
  --beam-warm:   rgba(255, 176, 120, 0.34);
  --beam-core:   rgba(255, 235, 214, 0.56);

  --font-display: "Bodoni Moda", Georgia, serif;
  --font-text:    "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 2px; --r-md: 4px; --r-lg: 8px;

  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;

  --section:  clamp(4rem, 8vw, 9rem);
  --gutter:   clamp(1.25rem, 5vw, 5rem);
  --maxw:     84rem;

  --ease:     cubic-bezier(0.23, 1, 0.32, 1);
  --d-fast:   160ms; --d-base: 240ms;

  --bar-h:    64px;

  --shadow-1: 0 1px 2px rgba(23,19,15,0.06), 0 2px 8px -2px rgba(23,19,15,0.08);
  --shadow-2: 0 2px 4px rgba(23,19,15,0.06), 0 12px 28px -8px rgba(23,19,15,0.14);
}

/* the engine's own tokens, pointed at this scheme so its devices inherit it */
:root {
  --sc-canvas: var(--paper);
  --sc-surface: var(--tint);
  --sc-ink: var(--ink);
  --sc-ink-soft: var(--muted);
  --sc-accent: var(--accent);
  --sc-accent-ink: var(--accent-ink);
  --sc-font-display: var(--font-display);
  --sc-font-text: var(--font-text);
  --sc-font-mono: var(--font-text);
}

/* ------------------------------------------------------------------ base -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 0.95rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }
:root { caret-color: var(--accent-text); accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: var(--r-sm); }
:where(a) { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
:where(table, .nums) { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ typography -- */
.display {
  font-family: var(--font-display); font-weight: 500;
  line-height: 1.02; letter-spacing: -0.025em;
  text-wrap: balance; margin: 0; font-optical-sizing: auto;
}
.t-xl { font-size: clamp(1.75rem, 0.85rem + 2.9vw, 3.25rem); }
.t-lg { font-size: clamp(1.7rem, 1.05rem + 2.2vw, 2.9rem); }
.t-md { font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem); letter-spacing: -0.015em; }
.lbl {
  font-family: var(--font-text); font-size: 0.68rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 var(--s-3);
}
.lbl--soft { color: var(--muted); }
.spec  { font-size: 0.85rem; color: var(--muted); margin: 0; text-wrap: pretty; }
.lede  { font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem); color: var(--ink); max-width: 46ch; margin: 0; }
.prose { max-width: 62ch; color: var(--muted); }
.prose p { margin: 0 0 var(--s-5); text-wrap: pretty; }

/* ---------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  white-space: nowrap; cursor: pointer; text-decoration: none;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.85em 1.4em; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent;
  transition: background var(--d-fast) var(--ease), transform 120ms var(--ease),
              border-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-text); color: var(--paper); }
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover { background: transparent; color: var(--accent-text); border-color: var(--accent-text); }
}
.btn--small { padding: 0.6em 1em; font-size: 0.66rem; }

/* ------------------------------------------------------------------- nav -- */
.bar {
  position: sticky; top: 0; z-index: 60;
  min-height: var(--bar-h);
  display: flex; align-items: center; gap: var(--s-5);
  padding-inline: var(--gutter);
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar__mark { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; flex: none; }
.bar__mark img { width: 26px; height: auto; }
.bar__name {
  font-family: var(--font-display); font-size: 0.84rem; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; line-height: 1.1;
}
.bar__nav { margin-left: auto; }
.bar__list { display: flex; align-items: center; gap: var(--s-6); list-style: none; margin: 0; padding: 0; }
.bar__link {
  position: relative; display: inline-block; padding: 6px 0;
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color var(--d-fast) var(--ease);
}
.bar__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 220ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .bar__link:hover { color: var(--ink); } }
.bar__link[aria-current="page"] { color: var(--ink); }
.bar__link[aria-current="page"]::after { transform: scaleX(1); }
.bar__cta { flex: none; }

/* the hamburger and its panel reuse the SAME <a> elements, moved by JS */
.bar__burger {
  display: none; margin-left: auto;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  align-items: center; justify-content: center;
}
.bar__burger span {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  position: relative; transition: background 120ms var(--ease);
}
.bar__burger span::before, .bar__burger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--ink);
  transition: transform var(--d-base) var(--ease);
}
.bar__burger span::before { top: -6px; }
.bar__burger span::after  { top: 6px; }
.bar__burger[aria-expanded="true"] span { background: transparent; }
.bar__burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.bar__burger[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

.panel {
  position: fixed; inset: var(--bar-h) 0 auto 0; z-index: 55;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: var(--s-5) var(--gutter) var(--s-7);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease),
              visibility var(--d-base);
}
.panel[data-open="true"] { transform: none; opacity: 1; visibility: visible; }
.panel .bar__list { flex-direction: column; align-items: stretch; gap: 0; }
.panel .bar__link {
  display: block;                 /* inline-block clips the rule to the text */
  font-size: 0.95rem; letter-spacing: 0.08em; padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
.panel .bar__link::after { display: none; }
.panel .bar__link[aria-current="page"] { color: var(--accent-text); }
.panel .bar__cta { margin-top: var(--s-5); display: block; }
.panel .btn { width: 100%; }

@media (max-width: 900px) {
  .bar__nav, .bar__cta--desktop { display: none; }
  .bar__burger { display: inline-flex; }
}

/* ----------------------------------------------------------------- plates --
   A photograph mounted on the paper page. The only dark surface in the scheme. */
.plate {
  background: var(--plate); color: var(--plate-ink);
  border-radius: var(--r-lg); overflow: hidden;
}

/* ------------------------------------------------------------------ cards -- */
/* A whole tile is an anchor, so every line inside it inherits the default
   underline. Kill it on the tile and put the affordance on the title only. */
a.card, a.card:visited { text-decoration: none; color: inherit; }
a.card h3 { text-decoration: underline; text-decoration-color: transparent;
            text-decoration-thickness: 1px; text-underline-offset: 0.18em;
            transition: text-decoration-color var(--d-fast) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  a.card:hover h3 { text-decoration-color: var(--accent-text); }
}
.card {
  background: var(--tint); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--d-fast) var(--ease), box-shadow var(--d-base) var(--ease),
              transform var(--d-base) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  a.card:hover, .card:has(a:hover) { border-color: var(--accent); box-shadow: var(--shadow-2); transform: translateY(-2px); }
}
.card__media { aspect-ratio: 4 / 5; background: var(--plate); position: relative; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.card__body h3 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.15rem;
  letter-spacing: -0.01em; line-height: 1.15; margin: 0;
}
.card__foot { margin-top: auto; padding-top: var(--s-3); }

.grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); } }
@media (max-width: 380px) { .grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ form -- */
.form { display: grid; gap: var(--s-4); max-width: 44rem; }
.form__row { display: grid; gap: var(--s-4); }
@media (min-width: 620px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field .req { color: var(--accent-text); }
.field :is(input, textarea) {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.7em 0.85em; font-size: 0.95rem;
  transition: border-color var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
}
.field :is(input, textarea):focus {
  outline: none; border-color: var(--accent-text);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}
.field :is(input, textarea):focus-visible { outline: none; }
.field textarea { resize: vertical; min-height: 6em; }
.field[data-invalid="true"] :is(input, textarea) { border-color: var(--accent-text); }
/* space is reserved so an error never shifts the layout under the cursor */
.field__error { font-size: 0.72rem; line-height: 1.3; color: var(--accent-text); min-height: 1.3em; margin: 0; }
.form__send { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.form__note { font-size: 0.76rem; color: var(--muted); margin: 0; }
.form__done {
  border: 1px solid var(--accent); background: var(--tint);
  border-radius: var(--r-md); padding: var(--s-6);
}
.form__done h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 var(--s-3); }

/* ---------------------------------------------------------------- footer -- */
.foot { border-top: 1px solid var(--line); padding-block: var(--s-7) var(--s-8); }
.foot__grid { display: grid; gap: var(--s-6); }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h2 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 var(--s-3); font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.foot a { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--accent-text); } }
.foot__base { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line);
              display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); justify-content: space-between; }
.foot__base p { margin: 0; font-size: 0.72rem; color: var(--muted); }

/* ----------------------------------------------------------------- motion --
   Headings arrive word by word, supporting elements one at a time. */
[data-reveal] { }
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.word > i {
  display: inline-block; font-style: inherit;
  transform: translateY(105%); opacity: 0;
  transition: transform 700ms var(--ease), opacity 500ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.is-in .word > i { transform: none; opacity: 1; }

[data-rise] > * {
  opacity: 0; transform: translateY(14px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}
[data-rise].is-in > * { opacity: 1; transform: none; }
[data-rise].is-in > *:nth-child(1) { transition-delay: 0ms; }
[data-rise].is-in > *:nth-child(2) { transition-delay: 70ms; }
[data-rise].is-in > *:nth-child(3) { transition-delay: 140ms; }
[data-rise].is-in > *:nth-child(4) { transition-delay: 210ms; }
[data-rise].is-in > *:nth-child(5) { transition-delay: 280ms; }
[data-rise].is-in > *:nth-child(n+6) { transition-delay: 340ms; }

/* Reduced motion: the complete reading experience, immediately. Nothing is
   hidden waiting for a trigger that will never animate. */
@media (prefers-reduced-motion: reduce) {
  .word > i, [data-rise] > * { transform: none !important; opacity: 1 !important; transition: none !important; }
  .panel { transition: none; }
  html { scroll-behavior: auto; }
}
