/* ============================================================
   Ericeira Brinca — PLACEHOLDER styling
   ------------------------------------------------------------
   Deliberately neutral. This is scaffolding, not the final
   look. Structure and class names are here so the visual
   design can be dropped in later without touching the HTML.
   Brand colours / fonts go in the :root tokens below.
   ============================================================ */

:root {
  --fg: #1c1c1a;
  --fg-muted: #6b6b63;
  --bg: #ffffff;
  --bg-alt: #f4f2ec;
  --accent: #3d5a34;          /* placeholder green — swap for brand */
  --border: #e2ddd2;
  --maxw: 1080px;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text in landscape */
}

body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;         /* long words / emails never overflow */
}

/* Anchor targets clear the sticky header instead of hiding under it. */
section[id], main[id] { scroll-margin-top: 84px; }

a { color: var(--accent); }

/* ---------- LANGUAGE SWITCHING ----------
   Only the active language is shown; the switch pill (bottom-left)
   flips [data-lang] on <html>. Default is PT if unset. */
[data-lang="pt"] .lang-en,
[data-lang="en"] .lang-pt,
:root:not([data-lang]) .lang-en { display: none; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--accent); font-weight: 400; font-style: italic; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }

/* ---------- HERO ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 32px 80px;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.statement {
  max-width: 720px;
  margin: 0 auto 40px;
  font-size: 1.3rem;
  line-height: 1.4;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--accent);
}
.btn:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--accent); }

/* ---------- SECTIONS ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 32px;
}
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.section-intro { color: var(--fg); font-size: 1.1rem; max-width: 680px; }

/* ---------- CARD GRID ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.section-alt .card { background: #fff; }
.card h3 { font-size: 1.15rem; margin-bottom: 12px; line-height: 1.3; }
.card p { font-size: 0.98rem; margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

/* ---------- PHASE CARDS ---------- */
.phase { display: flex; flex-direction: column; border-top: 3px solid var(--accent); }
.phase-when {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.phase-who {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
}

/* ---------- PATTERNS (numbered list) ---------- */
.patterns {
  list-style: none;
  counter-reset: pat;
  margin-top: 40px;
  display: grid;
  gap: 22px;
}
.patterns li {
  counter-increment: pat;
  position: relative;
  padding-left: 64px;
}
.patterns li::before {
  content: counter(pat, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
}
.patterns h3 { font-size: 1.1rem; margin-bottom: 6px; }
.patterns p { font-size: 0.98rem; }

/* ---------- CONTACT ---------- */
.contact-name { font-size: 1.3rem; font-weight: 600; margin-top: 28px; }

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 32px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* ---------- LANGUAGE SWITCH PILL ---------- */
.lang-switch {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.lang-switch button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  padding: 7px 15px;
  border-radius: 999px;
  line-height: 1;
}
.lang-switch button:hover { color: var(--fg); }
.lang-switch button.is-active { background: var(--accent); color: #fff; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .site-header { padding: 12px 18px; gap: 6px 16px; }
  .site-nav { width: 100%; gap: 4px 18px; }
  .site-nav a { padding: 4px 0; }

  .hero { padding: 52px 20px 44px; }
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); margin-bottom: 20px; }
  .statement { font-size: 1.12rem; margin-bottom: 32px; }

  .hero-actions { flex-direction: column; }
  .btn { display: block; width: 100%; padding: 14px 20px; text-align: center; }

  .section { padding: 48px 20px; }
  .section-intro { font-size: 1rem; }

  .grid, .grid-4 { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .card { padding: 22px 20px; }

  .patterns { margin-top: 28px; }
  .patterns li { padding-left: 44px; }
  .patterns li::before { font-size: 1.3rem; }

  /* extra bottom room so the fixed language pill never covers footer text */
  .site-footer { padding: 32px 20px 84px; }
  .lang-switch button { padding: 9px 16px; }
}
