/* ==========================================================================
   Ventura Trade Company
   Palette: Graphite & Cobalt. One accent, one radius (0), one theme per view.
   ========================================================================== */

/* --- Fonts: self-hosted Geist variable, latin + latin-ext ---------------- */
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-latin-ext.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/geist-mono-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/geist-mono-latin-ext.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens: full light palette defined once on :root -------------------- */
:root {
  --page:        #f3f2ef;
  --surface:     #e9e7e2;
  --ink:         #17191c;
  --muted:       #5f646a;
  --line:        #d3d1cb;
  --line-strong: #b4b1a9;
  --field-border:#848178;
  --accent:      #2c59d6;
  --accent-hover:#23499f;
  --on-accent:   #ffffff;
  --danger:      #a3231b;

  --radius: 0;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 62ch;
  --nav-h: 64px;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page:        #121417;
    --surface:     #1a1d21;
    --ink:         #ecebe7;
    --muted:       #a2a8ae;
    --line:        #2b2f35;
    --line-strong: #3d434a;
    --field-border:#666d75;
    --accent:      #8aa6f8;
    --accent-hover:#adc0fb;
    --on-accent:   #101624;
    --danger:      #f0918a;
  }
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 0.6rem 1rem; font-size: 0.875rem; font-weight: 500;
  transition: top 140ms var(--ease);
}
.skip-link:focus { top: 0.5rem; }

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

/* --- Type --------------------------------------------------------------- */
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.08; }

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.7rem, 3.1vw, 2.5rem);
  text-wrap: balance;
}
h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }

p { max-width: var(--measure); }

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
}

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Layout ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { scroll-margin-top: calc(var(--nav-h) + 8px); }

.section-pad { padding-block: clamp(4.5rem, 10vw, 8.5rem); }

.rule { border: 0; border-top: 1px solid var(--line); }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--page); }
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; width: 100%;
}

.wordmark {
  font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2rem); }

.nav a:not(.btn) {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms var(--ease);
}
.nav a:not(.btn):hover { color: var(--ink); }

/* Anchor shortcuts are redundant on a single-scroll page at phone width */
.nav-links { display: contents; }
@media (max-width: 799px) { .nav-links { display: none; } }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms var(--ease), transform 90ms var(--ease),
              border-color 150ms var(--ease), color 150ms var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }

.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.8125rem; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--field-border); }
.btn-ghost:hover { border-color: var(--ink); }

/* --- Hero: asymmetric split, text left, image bleeding right ------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: min(86dvh, 760px);
  border-bottom: 1px solid var(--line);
}

.hero-text {
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.5rem;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4.5rem)
           clamp(3rem, 7vw, 5.5rem) var(--gutter);
}
.hero-text p { max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

.hero-media { position: relative; overflow: hidden; background: var(--surface); }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 46% 62%;
}

@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding-inline: var(--gutter); padding-block: clamp(3rem, 12vw, 4.5rem); }
  .hero-media { aspect-ratio: 16 / 10; }
  .hero-media img { height: 100%; }
}

/* --- Capabilities: tall image left, stacked list right ------------------ */
.capabilities {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.capabilities-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}
.capabilities-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }

.capabilities-body > h2 { margin-bottom: 2.25rem; }

.cap-list { list-style: none; padding: 0; }
.cap-list li { padding-block: 1.65rem; border-top: 1px solid var(--line); }
.cap-list li:first-child { border-top: 0; padding-top: 0; }
.cap-list h3 { margin-bottom: 0.4rem; }
.cap-list p { color: var(--muted); max-width: 54ch; }

@media (max-width: 899px) {
  .capabilities { grid-template-columns: 1fr; }
  .capabilities-media { aspect-ratio: 16 / 10; }
}

/* --- Commodities: full-bleed band, then a row of large type -------------- */
.band {
  width: 100%;
  height: clamp(200px, 34vh, 380px);
  overflow: hidden;
  background: var(--surface);
}
.band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

.commodities-head { max-width: 54ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.commodities-head p { margin-top: 1rem; color: var(--muted); }

.commodity-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.commodity-row > div { border-top: 1px solid var(--line-strong); padding-top: 1.25rem; }
.commodity-row h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
@media (max-width: 767px) {
  .commodity-row { grid-template-columns: 1fr; gap: 0; }
  .commodity-row > div { padding-block: 1.15rem; }
}

/* --- Offices: four columns on hairlines --------------------------------- */
.offices { background: var(--surface); }

.offices-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.offices-head p { margin-top: 1rem; color: var(--muted); }

.office-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-strong);
}
.office-grid > div {
  padding: 1.75rem clamp(0.75rem, 2vw, 1.75rem) 0.5rem 0;
  border-left: 1px solid var(--line);
  padding-left: clamp(0.75rem, 2vw, 1.75rem);
}
.office-grid > div:first-child { border-left: 0; padding-left: 0; }
.office-grid h3 { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); margin-bottom: 0.35rem; }
.office-grid .label { display: block; }

@media (max-width: 767px) {
  .office-grid { grid-template-columns: 1fr 1fr; }
  .office-grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .office-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 1.25rem; }
}

.supplier-note {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  max-width: none;
}

/* --- Contact: split, copy left, form right ------------------------------ */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.contact-copy p { margin-top: 1.25rem; color: var(--muted); }

.contact-direct {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.contact-direct .label { display: block; margin-bottom: 0.5rem; }
.email-link {
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
  overflow-wrap: anywhere;
}
.email-link:hover { color: var(--accent-hover); border-bottom-color: currentColor; }

@media (max-width: 899px) { .contact { grid-template-columns: 1fr; } }

/* --- Form --------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-wide { grid-column: 1 / -1; }

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}
.field .optional { color: var(--muted); font-weight: 400; }

.field input, .field textarea {
  font: inherit;
  font-size: 0.9375rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.offices .field input, .offices .field textarea { background: var(--page); }
.field textarea { resize: vertical; min-height: 7.5rem; }

.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }

.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field-error { display: none; font-size: 0.8125rem; color: var(--danger); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }
.field input:user-invalid ~ .field-error,
.field textarea:user-invalid ~ .field-error { display: block; }

.form-footer {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  margin-top: 0.25rem;
}
.form-note { font-size: 0.8125rem; color: var(--muted); max-width: 34ch; }

@media (max-width: 599px) { .form-grid { grid-template-columns: 1fr; } }

/* --- Closing image ------------------------------------------------------ */
.closing { position: relative; }
.closing .band { height: clamp(220px, 40vh, 440px); }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: 0.875rem;
}
.footer-top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-bottom: 2rem;
}
.footer-offices { color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 150ms var(--ease); }
.site-footer a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}
.footer-bottom p { max-width: none; }

/* --- Standalone pages (thanks / 404) ------------------------------------ */
.page-center {
  min-height: calc(100dvh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(3rem, 10vw, 7rem);
}
.page-center p { margin-top: 1.25rem; color: var(--muted); }
.page-center .btn { margin-top: 2rem; align-self: flex-start; }

/* --- Motion: reveal on enter, gated behind reduced-motion --------------- */
/* Scoped to .js so that with JavaScript disabled or broken the content is simply
   visible, rather than stuck at opacity 0 with nothing left to reveal it. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); }
  .js .reveal.is-visible {
    opacity: 1; transform: none;
    transition: opacity 640ms var(--ease), transform 640ms var(--ease);
  }
}
