/* Ericeira Tech Hub — design system
   Three colours: White Sand base, Atlantic Blue primary, Sunset Gold accent for calls to action.
   Type: Manrope, self-hosted, two weights (500 body, 700 headings). */

@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* base */
  --sand:      #f7f5f2;   /* White Sand, page background */
  --white:     #ffffff;   /* cards */
  /* primary */
  --blue:      #3a5f7d;   /* Atlantic Blue, nav, eyebrows, links */
  --blue-deep: #2c4a61;   /* headings and body text, 8.5:1 on sand */
  /* accent, calls to action only */
  --gold:      #f2b560;   /* Sunset Gold */
  --gold-dark: #e2a344;   /* hover */
  --gold-edge: #a97324;   /* button border, 3.7:1 on sand so the control has a visible boundary */
  --gold-ink:  #1f3340;   /* text on gold, 7.2:1 */
  /* neutrals */
  --meta:      #5f5a55;   /* secondary text, 6.3:1 on sand */
  --rule:      #e0dcd6;   /* soft dividers, decorative */
  --field:     #8b8b8b;   /* form borders, 3.1:1 on sand */

  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(1.5rem, 5vw, 2.5rem);
  /* tightened: desktop down ~22%, mobile down ~33% */
  --section: clamp(3.35rem, 7.5vw, 7rem);
  --stack: clamp(1.6rem, 4vw, 2.75rem);
  --r-card: 18px;
  --r-btn: 999px;
  --r-img: 20px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[class] { list-style: none; padding: 0; }
img, picture, svg { max-width: 100%; display: block; }
input, textarea, button, select { font: inherit; color: inherit; }

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

/* ---------- base ---------- */
body {
  background: var(--sand);
  color: var(--blue-deep);
  font-family: var(--font);
  font-size: 1.0625rem;      /* 17px */
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: .004em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.14; letter-spacing: -.02em; color: var(--blue-deep); }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.1rem); line-height: 1.06; letter-spacing: -.03em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
h3 { font-size: clamp(1.15rem, 2.1vw, 1.35rem); line-height: 1.35; letter-spacing: -.012em; }

p { max-width: 66ch; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); }
cite { font-style: italic; } /* book and work titles */
strong { font-weight: 700; }

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

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--gold); color: var(--gold-ink); padding: .8rem 1.3rem; font-weight: 700; text-decoration: none; }
.skip:focus { left: 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.narrow { max-width: 62ch; }

.lead { font-size: clamp(1.12rem, 2.1vw, 1.35rem); line-height: 1.6; color: var(--meta); max-width: 56ch; }
h1 + .lead, h2 + .lead { margin-top: 1.5rem; }

.eyebrow {
  font-size: .8125rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 1.25rem;
}
.body-note { margin-top: 1.5rem; color: var(--meta); }
.after-grid { margin-top: var(--stack); }

.section-head { margin-bottom: var(--stack); }
.section-head h2 { max-width: 20ch; }
.section-head .lead { margin-top: 1.25rem; }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--gold); color: var(--gold-ink);
  font-weight: 700; font-size: 1rem; padding: .95rem 2rem;
  border: 2px solid var(--gold-edge); border-radius: var(--r-btn); cursor: pointer;
  text-decoration: none; transition: background .18s ease, border-color .18s ease;
}
.btn:hover, .btn:focus-visible { background: var(--gold-dark); border-color: var(--gold-edge); color: var(--gold-ink); }

.btn-quiet { background: transparent; color: var(--blue-deep); border-color: var(--field); }
.btn-quiet:hover, .btn-quiet:focus-visible { background: transparent; border-color: var(--blue-deep); color: var(--blue-deep); }

.link-arrow { font-weight: 700; display: inline-block; }
.link-arrow::after { content: ' \2192'; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 245, 242, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.header.is-stuck { border-bottom-color: var(--rule); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.header.is-stuck .wrap { min-height: 3.85rem; }

.brand { display: flex; align-items: center; gap: .7rem; color: var(--blue-deep); font-weight: 700; letter-spacing: .02em; font-size: .875rem; text-transform: uppercase; text-decoration: none; }
.brand img { width: 30px; height: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; background: none;
  border: 1px solid var(--field); border-radius: var(--r-btn);
  color: var(--blue-deep); padding: .5rem 1rem; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--blue-deep); }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a { color: var(--meta); font-size: .95rem; padding: .5rem .8rem; border-radius: var(--r-btn); text-decoration: none; transition: color .15s ease; }
.nav a:hover { color: var(--blue-deep); }
.nav a[aria-current='page'] { color: var(--blue-deep); font-weight: 700; }

.lang { display: flex; align-items: center; gap: .1rem; margin-left: .5rem; padding-left: .85rem; border-left: 1px solid var(--rule); }
.lang button { background: none; border: none; cursor: pointer; color: var(--meta); font-size: .8125rem; font-weight: 700; letter-spacing: .06em; padding: .35rem .4rem; }
.lang button[aria-pressed='true'] { color: var(--blue); text-decoration: underline; text-underline-offset: .25em; }
.lang button:hover { color: var(--blue-deep); }

@media (max-width: 51.9375rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 4.5rem 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sand); border-bottom: 1px solid var(--rule);
    padding: .5rem var(--gutter) 1.5rem; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .95rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .lang { margin: 1.25rem 0 0; padding: 0; border-left: 0; }
}
@media (min-width: 52rem) { .nav-toggle { display: none; } .nav { display: flex !important; } }

/* Touch targets: 44px minimum on anything a thumb has to hit. */
@media (pointer: coarse) {
  .nav-toggle, .lang button, .signup button, .signup input, .cookie button, .btn {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  }
  .lang button { min-width: 44px; }
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .footer-links a { padding-block: .35rem; }
}

/* ---------- hero ---------- */
.hero .wrap { padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-top: 1.75rem; }
.hero .btn { margin-top: 2.5rem; }
.hero-note { margin-top: 2rem; font-size: .95rem; color: var(--meta); max-width: 48ch; }

.hero-media { position: relative; }
.hero-media img { width: 100%; height: clamp(18rem, 46vw, 32rem); object-fit: cover; }
.hero-media::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(180deg, rgba(247,245,242,0) 0%, rgba(247,245,242,.85) 70%, var(--sand) 100%);
  pointer-events: none;
}

.page-head { padding-block: clamp(3.5rem, 9vw, 6rem) clamp(2rem, 5vw, 3rem); }
.page-head h1 { max-width: 18ch; }
.page-head .lead { margin-top: 1.75rem; }

/* ---------- figures ---------- */
.figure { margin-top: var(--stack); }
.figure img { width: 100%; border-radius: var(--r-img); }
.figure figcaption { margin-top: .9rem; font-size: .9rem; color: var(--meta); }

/* ---------- pillars ---------- */
.pillars { display: grid; gap: 1.25rem; }
@media (min-width: 52rem) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  background: var(--white); border-radius: var(--r-card);
  padding: clamp(1.75rem, 3vw, 2.25rem);
}
.pillar h3 { margin-bottom: .55rem; }
.pillar p { color: var(--meta); font-size: 1rem; }

/* ---------- activity areas ---------- */
.areas { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 44rem) { .areas { grid-template-columns: repeat(2, 1fr); } }
.area h3 { margin-bottom: .5rem; }
.area p { color: var(--meta); font-size: 1rem; }
.area .num { display: block; font-size: .8125rem; font-weight: 700; letter-spacing: .12em; color: var(--blue); margin-bottom: .6rem; }

/* ---------- how it works blocks ---------- */
.block { display: grid; gap: 1rem 3rem; padding-block: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--rule); }
.block:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 52rem) { .block { grid-template-columns: 1fr 2fr; } }
.block h2 { font-size: clamp(1.5rem, 2.8vw, 1.9rem); line-height: 1.2; }
.block p { color: var(--meta); }
.block .status { color: var(--blue-deep); margin-top: 1rem; font-weight: 700; }
.block dl { margin: 1.25rem 0 0; display: grid; gap: .6rem 1.5rem; }
@media (min-width: 34rem) { .block dl { grid-template-columns: max-content 1fr; } }
.block dt { font-weight: 700; color: var(--blue-deep); font-size: .95rem; }
.block dd { margin: 0; color: var(--meta); font-size: .95rem; }

/* ---------- people ---------- */
.people { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 44rem) { .people { grid-template-columns: repeat(2, 1fr); } }
.person img { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-img); margin-bottom: 1.5rem; }
.person h3 { margin-bottom: .2rem; }
.person .role { color: var(--blue); font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.person p { color: var(--meta); font-size: 1rem; }

/* ---------- callout ---------- */
.callout h2 { max-width: 18ch; }
.callout .lead { margin-top: 1.5rem; }
.callout .btn { margin-top: 2.5rem; }

/* ---------- form ---------- */
.form { display: grid; gap: 1.5rem; max-width: 34rem; margin-top: var(--stack); }
.field { display: grid; gap: .5rem; }
.field label { font-size: .95rem; font-weight: 700; }
.field input, .field textarea, .field select {
  background: var(--white); border: 1px solid var(--field); border-radius: 12px;
  color: var(--blue-deep); padding: .85rem 1rem; width: 100%; font-size: 1rem;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--blue); }
.field textarea { min-height: 9rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--meta); }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-status { font-size: 1rem; color: var(--blue); min-height: 1.5rem; font-weight: 700; }
.form-status[data-state='error'] { color: #a33a1f; }

.contact-details { display: grid; gap: 2rem; margin-top: var(--stack); }
@media (min-width: 44rem) { .contact-details { grid-template-columns: repeat(2, 1fr); } }
.contact-details h2 { font-size: 1rem; line-height: 1.4; margin-bottom: .4rem; }
.contact-details p { color: var(--meta); font-size: 1rem; }

/* ---------- prose ---------- */
.prose { max-width: 62ch; }
.prose h2 { font-size: clamp(1.35rem, 2.8vw, 1.7rem); margin-top: 3rem; margin-bottom: 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 1.25rem; color: var(--meta); }
.prose .updated { font-size: .95rem; color: var(--meta); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--rule); padding-block: clamp(3rem, 6vw, 4.5rem); }
.footer .wrap { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .footer .wrap { grid-template-columns: 1fr 1fr auto; align-items: start; } }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer-links a { color: var(--meta); font-size: .95rem; text-decoration: none; }
.footer-links a:hover { color: var(--blue-deep); text-decoration: underline; }
.footer-meta { color: var(--meta); font-size: .9rem; }
.footer-meta a { color: var(--meta); }
.footer h2 { font-size: .95rem; margin-bottom: .6rem; }
.footer p { font-size: .9rem; color: var(--meta); }

.signup { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; max-width: 22rem; }
.signup input { flex: 1 1 11rem; background: var(--white); border: 1px solid var(--field); border-radius: var(--r-btn); padding: .65rem 1rem; font-size: .95rem; color: var(--blue-deep); }
.signup button { padding: .65rem 1.25rem; font-size: .95rem; border-radius: var(--r-btn); background: transparent; color: var(--blue-deep); border: 1px solid var(--field); font-weight: 700; cursor: pointer; }
.signup button:hover { border-color: var(--blue-deep); }
.signup-status { font-size: .85rem; color: var(--blue); margin-top: .6rem; min-height: 1.2rem; }

/* ---------- cookie notice ---------- */
.cookie {
  position: fixed; left: auto; right: var(--gutter); bottom: var(--gutter); z-index: 150;
  width: min(26rem, calc(100vw - 2 * var(--gutter)));
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-card);
  padding: 1.35rem 1.5rem; display: none;
}
.cookie.is-visible { display: block; }
.cookie p { font-size: .95rem; color: var(--meta); margin-bottom: 1rem; }
.cookie button { padding: .6rem 1.3rem; font-size: .95rem; }

/* ---------- essence line ---------- */
.essence {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; line-height: 1.45;
  letter-spacing: -.015em; color: var(--blue-deep); max-width: 30ch;
}
/* h1 sits on a tight line height, so clear its descenders properly */
h1 + .essence { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); }
.essence em { font-style: normal; color: var(--blue); }

/* ---------- values ---------- */
.values { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .values { grid-template-columns: repeat(5, 1fr); } }
.value { background: var(--white); border-radius: var(--r-card); padding: 1.5rem 1.4rem; }
.value h3 { font-size: 1rem; margin-bottom: .4rem; }
.value p { color: var(--meta); font-size: .9375rem; }

/* ---------- timeline ---------- */
.timeline { display: grid; gap: 0; margin-top: var(--stack); }
.milestone { display: grid; gap: .35rem 2rem; padding-block: 1.6rem; border-top: 1px solid var(--rule); position: relative; }
.milestone:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 40rem) { .milestone { grid-template-columns: 7rem 1fr; } }
.milestone .year { font-size: 1.4rem; font-weight: 700; color: var(--blue); letter-spacing: -.02em; line-height: 1.2; }
.milestone h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.milestone p { color: var(--meta); font-size: 1rem; }

/* ---------- pull quote ---------- */
.quote {
  background: var(--white); border-radius: var(--r-card);
  padding: clamp(1.75rem, 4vw, 2.75rem); margin-top: var(--stack);
  border-left: 4px solid var(--gold-edge);
}
.quote blockquote { font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 700; line-height: 1.45; letter-spacing: -.015em; max-width: 44ch; }
.quote figcaption { margin-top: 1rem; font-size: .9rem; color: var(--meta); }

/* ---------- earthy texture, drawn in CSS so nothing is licensed ---------- */
.textured { position: relative; isolation: isolate; }
.textured::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(58,95,125,.05) 0, transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(242,181,96,.07) 0, transparent 46%);
}

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; align-items: center; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
.no-js .reveal { opacity: 1; transform: none; }
