/* ==========================================================================
   The Italian Brand Company — "Homepage in aanbouw"
   Tokens mirror the Claude Design source: light is the base, dark overrides.
   ========================================================================== */

:root {
  --bg:              #F6F3EE;
  --ink:             #14110F;
  --muted:           #6E6A65;
  --hairline:        #DCD6CC;
  --tricolore-white: #DCD6CC;

  /* Fixed across themes */
  --gold:  #B08D57;
  --green: #007A3D;
  --red:   #CE2B37;

  --serif: 'Cormorant Garamond', Cormorant, Garamond, 'Times New Roman', serif;
  --sans:  Jost, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --gutter: clamp(24px, 5vw, 40px);

  color-scheme: light;
}

/* System preference — unless the visitor has explicitly chosen light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:              #14110F;
    --ink:             #F6F3EE;
    --muted:           #9A948C;
    --hairline:        #3A3531;
    --tricolore-white: #F6F3EE;
    color-scheme: dark;
  }
}

/* Explicit choice wins in both directions. */
:root[data-theme="dark"] {
  --bg:              #14110F;
  --ink:             #F6F3EE;
  --muted:           #9A948C;
  --hairline:        #3A3531;
  --tricolore-white: #F6F3EE;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:              #F6F3EE;
  --ink:             #14110F;
  --muted:           #6E6A65;
  --hairline:        #DCD6CC;
  --tricolore-white: #DCD6CC;
  color-scheme: light;
}

/* --------------------------------------------------------------- reset -- */

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

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, p { margin: 0; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- shell -- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
}

/* ------------------------------------------------------------- masthead -- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand__mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.14em;
  line-height: 1;
}

.tricolore {
  display: flex;
  width: 60px;
  height: 2px;
}

.tricolore > i { flex: 1; }
.tricolore__green { background: var(--green); }
.tricolore__white { background: var(--tricolore-white); }
.tricolore__red   { background: var(--red); }

.theme-toggle {
  background: none;
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------------------------------------------------------------- stage -- */

.stage {
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vw, 64px) 0;
}

.panel {
  max-width: 620px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--gold { color: var(--gold); }

.headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 9vw, 68px);
  line-height: 1.1;
  margin-top: 26px;
  text-wrap: balance;
}

.lead {
  font-weight: 300;
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  margin-top: 24px;
  max-width: 440px;
  text-wrap: pretty;
}

.rule {
  width: 1px;
  height: 56px;
  background: var(--hairline);
  margin: clamp(28px, 6vw, 44px) 0;
}

.contact {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 4.6vw, 34px);
  line-height: 1.2;
  margin-top: 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 4px;
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.contact:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* ------------------------------------------------------------- colophon -- */

.colophon {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
