/* SoftPears — v1 styles.
   Tokens locked from docs/design/giga-style-reference.md (Giga via Mobbin, measured).
   Edit copy in index.html; edit colors/type/spacing here in :root only. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Color — measured from Giga sections */
  --paper: #f8f8f8;
  --paper-warm: #f7f5ee;
  --surface: #ffffff;
  --ink: #1f201f;
  --muted: #6b6d6c;        /* measured #7d7f7e, darkened for WCAG AA on --paper */
  --line: #e6e5e2;
  --dark: #0e0d12;
  --dark-ink: #f4f4f6;
  --dark-muted: #9a9aa2;
  --accent: #e96d26;       /* burnt orange — dots, tags; text only on dark bg */
  --accent-soft: rgba(233, 109, 38, 0.10);
  --scrim: rgba(14, 13, 18, 0.38);

  /* Type — all system fonts */
  --font-display: ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-label: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  --text-xl: clamp(1.3rem, 1.1rem + 1vw, 1.6rem);
  --text-2xl: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem);
  --text-hero: clamp(2.3rem, 1.6rem + 3.6vw, 4.2rem);
  --label-size: 0.72rem;
  --label-tracking: 0.12em;
  --leading-tight: 1.12;
  --leading-body: 1.6;
  --measure: 68ch;

  /* Space / shape */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 1rem; --space-4: 1.5rem;
  --space-5: 2rem; --space-6: 3rem; --space-7: 4.5rem; --space-8: 7rem;
  --radius-pill: 999px;
  --radius-card: 18px;
  --shadow-card: 0 6px 20px rgba(20, 18, 16, 0.05);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 { margin: 0; }

h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: var(--leading-tight);
}

h3 { font-size: var(--text-xl); font-weight: 600; }

p { margin: 0; }

.container {
  width: min(100% - 2 * clamp(16px, 5vw, 48px), 1120px);
  margin-inline: auto;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--dark-ink);
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(20, 18, 16, 0.10), 0 3px 10px rgba(20, 18, 16, 0.07);
  transition:
    background-color 0.3s ease-out,
    color 0.3s ease-out,
    border-color 0.3s ease-out,
    backdrop-filter 0.3s ease-out,
    box-shadow 0.3s ease-out;
}

.btn:active { box-shadow: 0 1px 2px rgba(20, 18, 16, 0.12); }

/* Giga pattern: on hover the pill turns to dark glass —
   translucent fill + 20px backdrop blur + faint border (giga.ai: hover:bg-primary-foreground/60 hover:backdrop-blur-[20px] hover:border-border) */
.btn-light {
  background: var(--dark-ink);
  color: var(--ink);
}
.btn-light:hover {
  background: rgba(14, 13, 18, 0.6);
  color: var(--dark-ink);
  border-color: rgba(244, 244, 246, 0.25);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.btn-compact { padding: 8px 18px; font-size: var(--text-sm); }

.link-light {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--dark-ink);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}
.link-light:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: 16px clamp(16px, 4vw, 40px);
}

.wordmark {
  font-weight: 700;
  font-size: var(--text-lg);
  text-decoration: none;
}

.site-header .wordmark { color: var(--dark-ink); }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 1.5vw, 16px);
  margin-inline: auto;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--dark-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  opacity: 0.85;
  transition: background-color 0.3s ease-out, opacity 0.3s ease-out, backdrop-filter 0.3s ease-out;
}
/* Giga "Sign in" pattern: glass capsule fades in around the link
   (giga.ai underlay: bg-white/10 + backdrop-blur-[20px], 300ms ease-out) */
.site-header nav a:hover {
  opacity: 1;
  background: rgba(244, 244, 246, 0.10);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(244, 244, 246, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(244, 244, 246, 0.08);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  color: var(--dark-ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.language-switcher a[aria-current="page"] {
  background: var(--dark-ink);
  color: var(--ink);
}

.language-switcher a:not([aria-current="page"]):hover {
  background: rgba(244, 244, 246, 0.12);
}

/* Narrow screens: header becomes a dark bar above the hero photo */
@media (max-width: 720px) {
  .site-header { position: static; background: var(--dark); }
  /* dark capsule is invisible on the dark bar — use a light one */
  .site-header nav a:hover { background: rgba(244, 244, 246, 0.12); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--dark); /* photo loading fallback */
  color: var(--dark-ink);
}

.hero-photo,
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-photo img { object-fit: cover; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * clamp(16px, 5vw, 48px), 880px);
  margin-inline: auto;
  padding-block: clamp(8rem, 18vh, 11rem) var(--space-5);
  text-align: center;
}

@media (max-width: 720px) {
  .hero-inner { padding-block: 4rem 3.5rem; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: var(--leading-tight);
  max-width: 26ch;
  margin-inline: auto;
}

.hero-lead {
  max-width: 56ch;
  margin: var(--space-4) auto 0;
  font-size: var(--text-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-5);
}

.cred-strip {
  /* wider than .hero-inner (880px) so the strip can fit on one line on desktop */
  position: relative;
  z-index: 1;
  width: min(100% - 2 * clamp(16px, 5vw, 48px), 1120px);
  margin: var(--space-4) auto 0;
  padding-bottom: clamp(3rem, 8vh, 5rem);
  text-align: center;
  font-size: var(--text-sm);
}

/* ---------- Sections ---------- */
section { padding-block: var(--space-8); }

.section-warm { background: var(--paper-warm); }

.section-compact { padding-block: var(--space-6); }

.section-dark {
  background: var(--dark);
  color: var(--dark-ink);
}

.section-head {
  max-width: var(--measure);
  margin: 0 auto var(--space-6);
  text-align: center;
}

.section-head h2 { margin-top: var(--space-2); }

.section-intro {
  margin-top: var(--space-3);
  font-size: var(--text-lg);
  color: var(--muted);
}

.section-dark .section-intro { color: var(--dark-muted); }

.eyebrow {
  font-family: var(--font-label);
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "● ";
  color: var(--accent);
  font-size: 0.6em;
  vertical-align: 0.2em;
}
.section-dark .eyebrow { color: var(--dark-muted); }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.card svg { display: block; margin-bottom: var(--space-3); color: var(--ink); }

.card h3 { margin-bottom: var(--space-2); }

.card p { color: var(--muted); }

/* ---------- Process steps ---------- */
.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: grid;
  gap: var(--space-5);
}

.step { display: flex; gap: var(--space-3); }

.num {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.step h3 { margin: 6px 0 var(--space-1); }
.step p { color: var(--muted); }

/* ---------- Technology ---------- */
.tech-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--measure);
}

.tech-list li {
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
}
.tech-list li:last-child { border-bottom: none; }
.tech-list strong { color: var(--ink); }

/* ---------- Quote band ---------- */
.quote-band { padding-block: var(--space-7); }

.quote-band blockquote {
  margin: 0 auto;
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.nowrap { white-space: nowrap; }

.quote-band blockquote::before {
  content: "●";
  display: block;
  margin-bottom: var(--space-3);
  color: var(--accent);
  font-size: 0.55rem;
}

/* ---------- Contact ---------- */
.contact-inner { text-align: center; }

.contact-inner h2 { margin-top: var(--space-2); }

.contact-inner .section-intro {
  max-width: var(--measure);
  margin-inline: auto;
}

.contact-email { margin-top: var(--space-5); font-size: var(--text-xl); }

.contact-email a {
  color: var(--dark-ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.contact-email a:hover { color: #ffffff; }

.contact-cta { margin-top: var(--space-4); }

.contact-help {
  max-width: 38ch;
  margin: var(--space-6) auto 0;
  text-align: left;
  color: var(--dark-muted);
  font-size: var(--text-sm);
}

.contact-help p { font-weight: 600; color: var(--dark-ink); }

.contact-help ul {
  margin: var(--space-2) 0 0;
  padding-left: 1.2em;
}
.contact-help li { margin-top: var(--space-1); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--dark-muted);
  border-top: 1px solid rgba(244, 244, 246, 0.12);
  padding-block: var(--space-6);
  font-size: var(--text-sm);
}

.site-footer .wordmark { color: var(--dark-ink); }

.site-footer .footer-line { margin-top: var(--space-2); }

.site-footer a {
  color: var(--dark-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-footer a:hover { color: #ffffff; }

.site-footer p + p { margin-top: var(--space-2); }

.copyright { margin-top: var(--space-4); }
