/* ============================================================
   TOMÉ — Home · Base & Components
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-300);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden], .hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; }

::selection { background: var(--green-300); color: var(--ink-900); }

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - var(--gutter) * 2, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - var(--gutter) * 2, var(--maxw-narrow)); margin-inline: auto; }
.section { padding-block: var(--section-pad); position: relative; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-snug); letter-spacing: -0.015em; }
.title { font-size: var(--fs-600); font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: var(--fs-400); color: var(--text-muted); line-height: 1.5; text-wrap: pretty; }

.overline {
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--primary-deep);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .65em;
}
.overline::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--primary);
  display: inline-block;
}
.overline.on-dark { color: var(--green-400); }

.text-green { color: var(--primary-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-200);
  letter-spacing: .005em;
  padding: .95em 1.6em;
  border-radius: var(--r-pill);
  transition: transform .25s var(--ease-out), background .25s, box-shadow .3s, color .25s;
  white-space: nowrap;
  will-change: transform;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-primary {
  background: var(--green-500);
  color: #11340b;
  box-shadow: var(--shadow-green);
}
.btn-primary:hover { background: var(--green-600); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--green-500); color: var(--primary-deep); transform: translateY(-2px); }
.btn-ghost.on-dark { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }
.btn-ghost.on-dark:hover { color: var(--green-400); box-shadow: inset 0 0 0 1.5px var(--green-400); }
.btn-lg { padding: 1.1em 2em; font-size: var(--fs-300); }

/* ---------- Image placeholders (striped) ---------- */
.ph {
  position: relative;
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(135deg,
      color-mix(in oklch, var(--concrete) 9%, transparent) 0 2px,
      transparent 2px 13px);
  border: 1px solid color-mix(in oklch, var(--concrete) 16%, transparent);
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--ink-300);
  isolation: isolate;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--concrete) 80%, transparent);
  padding: .5em .9em;
  border: 1px solid color-mix(in oklch, var(--concrete) 24%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in oklch, var(--paper) 70%, transparent);
  text-align: center;
  max-width: 80%;
  backdrop-filter: blur(2px);
}
.ph.on-dark {
  background-color: var(--night-700);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,.05) 0 2px, transparent 2px 13px);
  border-color: rgba(255,255,255,.12);
}
.ph.on-dark::after {
  color: rgba(255,255,255,.62);
  border-color: rgba(255,255,255,.2);
  background: rgba(0,0,0,.25);
}

/* small camera glyph behind label */
.ph .ph-icon {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: .12; z-index: -1;
}
.ph .ph-icon svg { width: clamp(40px, 12%, 84px); height: auto; }
