/* ═══════════════════════════════════════════════════════════════════════
   Vellere — page layout
   Everything that was an inline style in the original export now lives here
   as a named class. Colors and fonts come from design-system.css tokens.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --page-max: 1200px;                      /* width of the content column */
  --page-gutter: clamp(20px, 5vw, 72px);   /* side padding, scales with viewport */
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); text-wrap: pretty; }
a { color: var(--color-text); text-decoration: none; }
a:hover { color: var(--color-accent-700); }

/* Small uppercase label used above sections ("About", "Focus") */
.section-label {
  font-size: 13px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-accent-700);
}

.divider { height: 2px; background: var(--color-divider); }


/* ── Navigation ─────────────────────────────────────────────────────────── */
/* Padding keeps the nav contents lined up with the centered content column. */
.site-nav {
  padding-inline: max(var(--page-gutter), calc((100% - var(--page-max)) / 2 + var(--page-gutter)));
}
.site-nav .nav-brand { letter-spacing: 0.18em; text-transform: uppercase; }
.site-nav a { white-space: nowrap; }


/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; height: min(100vh, 920px); min-height: 600px;
  background: var(--color-text); overflow: hidden;
}
.hero__image {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center;
}
/* Dark gradient over the photo so the white headline stays readable */
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--color-text) 25%, transparent) 0%,
    color-mix(in srgb, var(--color-text) 35%, transparent) 45%,
    color-mix(in srgb, var(--color-text) 82%, transparent) 100%);
}
.hero__content { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; }
.hero__inner {
  max-width: var(--page-max); margin: 0 auto;
  padding: 0 var(--page-gutter) clamp(48px, 8vh, 96px);
}
.hero__title {
  font-size: clamp(44px, 7vw, 104px); line-height: 1.02; letter-spacing: -0.025em;
  margin: 0 0 0 -0.058em; /* negative left margin optically aligns the big letters */
  color: var(--color-bg); max-width: 14ch;
}
.hero__title span { display: block; } /* each span is one line */
.hero__rule { height: 2px; background: var(--color-bg); margin: clamp(28px, 4vh, 48px) 0 20px; }
.hero__tags {
  display: flex; flex-wrap: wrap; gap: 8px 40px; list-style: none; margin: 0; padding: 0;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-bg);
}


/* ── Main column ────────────────────────────────────────────────────────── */
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-gutter); }


/* ── About ──────────────────────────────────────────────────────────────── */
.about {
  padding: 112px 0 96px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 28px clamp(24px, 5vw, 96px);
}
.about__text {
  grid-column: span 2;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(26px, 3vw, 40px); line-height: 1.22; letter-spacing: -0.015em;
  margin: 0; max-width: 26ch;
}


/* ── Focus grid ─────────────────────────────────────────────────────────── */
.focus { padding: 56px 0 112px; }
.focus > .section-label { display: block; margin: 0 0 32px; }

/* 4 columns when the grid is wider than 960px, 2 columns above 380px,
   1 column below that. The 2px gap shows the accent red (same as the
   corner squares) as grid lines. */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(25% - 2px, (960px - 100%) * 999, clamp(50% - 2px, (380px - 100%) * 999, 100%)), 1fr));
  gap: 2px; background: var(--color-accent); border: 2px solid var(--color-accent);
}
.focus-card {
  position: relative; height: 260px; padding: 44px 24px 22px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--color-bg); cursor: default;
}
.focus-card:focus-visible { outline-offset: -2px; }
.focus-card::before { /* the small red square in the corner */
  content: ""; position: absolute; top: 22px; left: 24px; width: 10px; height: 10px;
  background: var(--color-accent);
}
.focus-card h2 { font-size: 24px; line-height: 1.17; letter-spacing: -0.01em; margin: 0; }

/* Description slides open on hover or keyboard focus */
.focus-card__reveal {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 360ms cubic-bezier(.2, .7, .2, 1), opacity 260ms ease;
}
.focus-card:is(:hover, :focus-within) .focus-card__reveal { grid-template-rows: 1fr; opacity: 1; }
.focus-card__reveal > div { overflow: hidden; min-height: 0; }
.focus-card__reveal p {
  font-size: 14px; line-height: 20px; margin: 0; padding-top: 10px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}


/* ── Contact ────────────────────────────────────────────────────────────── */
/* Default is the red band. For the light version, add the class
   "contact--ink" to the <section> in index.html. */
.contact { background: var(--color-accent); color: var(--color-bg); }
.contact__inner { max-width: var(--page-max); margin: 0 auto; padding: 112px var(--page-gutter); }
.contact h2 {
  font-size: clamp(34px, 4.6vw, 64px); line-height: 1.06; letter-spacing: -0.018em;
  margin: 0 0 0 -0.058em; max-width: 20ch;
}
.contact__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 48px; }
.contact .btn { color: var(--color-bg); border-color: var(--color-bg); }

.contact--ink { background: var(--color-bg); color: var(--color-text); border-top: 2px solid var(--color-divider); }
.contact--ink .btn {
  background: var(--color-accent); border-color: transparent;
  padding-inline: calc(var(--space-3) * 1.2);
}
.contact--ink .btn:hover { background: var(--color-accent-600); }
.contact--ink .btn:active { background: var(--color-accent-700); }


/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  max-width: var(--page-max); margin: 0 auto; padding: 28px var(--page-gutter);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; line-height: 28px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.site-footer__brand { letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-text); }


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .focus-card__reveal { transition: none; }
}


/* ── Team ───────────────────────────────────────────────────────────────── */
.team__inner { max-width: var(--page-max); margin: 0 auto; padding: 96px var(--page-gutter); }
.team .section-label { display: block; margin: 0 0 32px; }

/* Three columns side by side; stacks to one column on narrow screens.
   The 2px gap shows the divider color as grid lines, like the Focus grid. */
.team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; background: var(--color-divider); border: 2px solid var(--color-divider);
}
.person { background: var(--color-bg); padding: 24px; display: flex; flex-direction: column; }
.person__photo {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  background: var(--color-surface); margin-bottom: 20px;
}
.person__name { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 6px; }
.person__role {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.person__bio {
  font-size: 14px; line-height: 20px; margin: 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

.person__location {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 20px;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

@media (max-width: 720px) {
  .team-grid { grid-template-columns: 1fr; }
  .person__photo { width: 120px; } /* keep photos small when cards stack */
}


/* ── Contact form dialog ────────────────────────────────────────────────── */
html:has(.contact-dialog[open]) { overflow: hidden; } /* stop the page scrolling behind it */

.contact-dialog {
  width: min(480px, calc(100% - 32px)); max-width: none; max-height: none;
  padding: 0; border: 0; border-top: 4px solid var(--color-accent);
  background: var(--color-bg); color: var(--color-text); box-shadow: var(--shadow-lg);
  overflow: visible;
}
.contact-dialog::backdrop { background: color-mix(in srgb, var(--color-neutral-900) 55%, transparent); }
.contact-dialog__panel {
  position: relative; padding: 32px;
  max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); overflow-y: auto;
}
.contact-dialog__close { position: absolute; top: 12px; right: 12px; }
.contact-dialog__close:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.contact-dialog__title { font-size: 28px; margin: 0 40px 4px 0; }
.contact-dialog__title:focus { outline: none; }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form[hidden] { display: none; }
.contact-form .input { font-size: 16px; min-height: 44px; } /* 16px stops phones zooming in on tap */
.contact-form__trap { display: none; }

.field-hint { font-size: 12px; margin: 0 0 6px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.field-error { font-size: 12px; margin: 6px 0 0; color: var(--color-accent-700); }
.input[aria-invalid="true"] { border-color: var(--color-accent-700); }

.check-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.check-group legend {
  padding: 0; margin-bottom: 2px; font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

/* Square checkbox to match the site's zero-radius style */
.check {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 15px; cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.check__box {
  position: relative; flex: none; width: 18px; height: 18px;
  border: 1.5px solid var(--color-divider); background: var(--color-surface);
}
.check:hover .check__box { border-color: var(--color-accent); }
.check input:checked + .check__box { background: var(--color-accent); border-color: var(--color-accent); }
.check input:checked + .check__box::after { /* tick mark */
  content: ""; position: absolute; left: 4.5px; top: 0.5px; width: 5px; height: 10px;
  border: solid var(--color-bg); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check input:focus-visible + .check__box { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.check-group[data-invalid] .check__box { border-color: var(--color-accent-700); }

.form-status {
  margin: 0; padding: 10px 12px; font-size: 13px;
  background: var(--color-accent-100); color: var(--color-accent-800);
}
.contact-form .dialog-actions { margin-top: 4px; }
.contact-form button[type="submit"]:disabled { opacity: 0.6; cursor: progress; }

.contact-done { display: flex; flex-direction: column; gap: 12px; }
.contact-done[hidden] { display: none; }
.contact-done p { margin: 0; font-size: 15px; }
.contact-done a { color: var(--color-accent-700); text-decoration: underline; }
.contact-done .dialog-actions { margin-top: 12px; }

.contact-dialog[open] { animation: dialog-in 220ms cubic-bezier(.2, .7, .2, 1); }
.contact-dialog[open]::backdrop { animation: backdrop-in 220ms ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes backdrop-in { from { opacity: 0; } }

@media (max-width: 480px) {
  .contact-dialog__panel { padding: 24px 20px; }
  .contact-dialog__title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-dialog[open], .contact-dialog[open]::backdrop { animation: none; }
}
