/* Meridian Flux site styles */

:root {
  /* Brand Guidelines v1.0, section 04 / Colour */
  --navy: #01246C;        /* Meridian Navy — wordmark, headings, text */
  --accent: #0048FC;      /* Flux Blue — accent, arrow, links, buttons */
  --navy-deep: #02153F;   /* Deep Space — dark backgrounds */
  --ground: #F4F6FB;      /* Cloud — light panels and surfaces */

  --white: #FFFFFF;
  --ink: #0B1530;
  --ink-2: #3F4B6B;
  --ink-3: #57638A;
  --line: #DCE2EE;
  --teal: #1BB5A6;

  /* Section 05 / Typography. Montserrat has no width axis, so the display
     sizes below use letter-spacing rather than font-stretch. */
  --font-display: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --pad-x: clamp(20px, 5.5vw, 80px);
  --section-y: clamp(64px, 8vw, 112px);
  --radius: 28px;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--navy); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 16px; color: var(--white); }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

/* Type */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 7.2vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.accent { color: var(--accent); }

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.h2-wide { max-width: 900px; }

.lede {
  max-width: 600px;
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--ink-2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-sm { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn-lg { min-height: 60px; padding: 0 32px; font-size: 18px; }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--navy); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--accent); color: var(--white); }
.btn-outline { border: 1.5px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); min-height: 52px; padding: 0 24px; }
.btn-white:hover { background: var(--teal); color: #04161C; }
.site-footer .btn-accent:hover { background: var(--white); color: var(--navy); }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  font-size: 17px;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand img { height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 40px; font-weight: 500; font-size: 16px; }
.nav-link { color: var(--navy); }
.nav-link:hover { color: var(--accent); }

/* Hero */
.hero { border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }

/* Contour backdrop: Serra da Estrela at 100 m intervals, from the survey
   shapefile. Masked so it fades in from the left and never sits behind the
   headline, and hidden from assistive tech — it is texture, not content. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/contours.svg") no-repeat center right / cover;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(to right, transparent 16%, #000 72%);
  mask-image: linear-gradient(to right, transparent 16%, #000 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-block: 64px;
}
.hero-copy { max-width: 760px; display: flex; flex-direction: column; gap: 32px; }
.hero-globe { width: min(520px, 38vw); height: auto; flex-shrink: 0; color: var(--navy); }
.globe-arrow { stroke: var(--accent); }

/* Sections */
.section { padding-block: var(--section-y); }
.section-white { background: var(--white); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; }
.section-head.split {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.section-head.split > div { display: flex; flex-direction: column; gap: 12px; }
.section-intro { max-width: 420px; font-size: 18px; color: var(--ink-2); }

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(420px, auto) minmax(420px, auto);
  gap: 24px;
}
.tile {
  border-radius: var(--radius);
  padding: 40px;
  overflow: hidden;
  display: flex;
}
.tile p { font-size: 17px; }
.tile-top { display: flex; flex-direction: column; gap: 16px; }

.tile-feature {
  grid-column: span 7;
  grid-row: span 2;
  background: var(--navy);
  color: var(--white);
  padding: 48px;
  gap: 40px;
}
.tile-feature .tile-top { gap: 20px; }
.tile-feature .tile-top p { font-size: 19px; color: #D5DCEE; }
.tile-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.tile-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.proof { font-family: var(--font-mono); font-size: 13px; color: #AEB9D6; }

.phone {
  width: 250px;
  height: 510px;
  flex-shrink: 0;
  align-self: center;
  border-radius: 40px;
  border: 8px solid #1E2F63;
  background: #122663;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #8E9CC4;
}

.tile-light {
  grid-column: span 5;
  background: var(--white);
  border: 1px solid var(--line);
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.tile-light p { color: var(--ink-2); }

.tile-terra {
  grid-column: span 5;
  background: #1F2A24;
  color: #F3EEE2;
  gap: 28px;
}
.tile-terra p { color: #D6D0BF; }
.tile-terra .text-link { color: #F3EEE2; }
.tile-terra .text-link:hover { color: var(--white); text-decoration: underline; }
.tile-stack { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }

.tile-title-lg, .tile-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.tile-title-lg { font-size: clamp(40px, 4vw, 56px); line-height: 1; letter-spacing: -0.02em; }
.tile-title { font-size: clamp(30px, 2.7vw, 38px); line-height: 1.05; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #C9CFDD;
  color: var(--ink-2);
}
.tag-teal { background: var(--teal); border-color: var(--teal); color: #04161C; font-weight: 500; }
.tag-dark { border-color: #5B6B94; color: #D5DCEE; }
.tag-earth { border-color: #6E7A6F; color: #E4DDCB; }

.terrain-grid {
  width: 176px;
  height: 176px;
  flex-shrink: 0;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
  padding: 8px;
  border-radius: 14px;
  background: #141B17;
}
.terrain-grid span { border-radius: 3px; }

.cta-strip {
  margin-top: 48px;
  border: 1.5px dashed #9AA5C2;
  border-radius: var(--radius);
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 6px;
}
.cta-sub { color: var(--ink-2); }

/* Approach */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.principle {
  padding: 28px 32px 8px;
  border-top: 2px solid var(--navy);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.principle:first-child { padding-left: 0; border-left: 0; }
.principle:last-child { padding-right: 0; }
.principle-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.principle h3 { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; }
.principle p:last-child { color: var(--ink-2); }

/* About */
.about { display: flex; gap: 80px; align-items: flex-start; }
.about .section-head { width: 420px; flex-shrink: 0; margin-bottom: 0; }
.founder { margin: 0; width: 220px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.founder img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.founder figcaption { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.founder-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.founder-role { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.08em; color: var(--ink-3); }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--white); padding: var(--section-y) 0 56px; }
.contact {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding-bottom: 104px;
}
.contact > div { display: flex; flex-direction: column; gap: 24px; }
.contact-title {
  max-width: 820px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 5.6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.contact-email { font-family: var(--font-mono); font-size: clamp(17px, 1.6vw, 22px); color: #8FB0FF; word-break: break-all; }
.contact-email:hover { color: var(--white); }
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid #22346A;
}
.footer-bar img { height: 32px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 32px; font-size: 15px; align-items: center; }
.footer-links a { color: #C5CFEA; }
.footer-links a:hover { color: var(--white); }
.footer-links span { color: #A7B3D6; }

/* Simple content pages (privacy, support, 404) */
.page { padding-block: var(--section-y); }
.page-body { max-width: 720px; display: flex; flex-direction: column; gap: 20px; }
.page-body h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 4.5vw, 64px); line-height: 1; letter-spacing: -0.02em; margin-bottom: 12px; }
.page-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin-top: 16px; }
.page-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-top: 12px; }
.page-body p, .page-body li { color: var(--ink-2); }
.page-body ul { list-style: disc; padding-left: 22px; }

/* Responsive */
@media (max-width: 1180px) {
  .hero-globe { display: none; }
  .hero::before { opacity: 0.3; }
  .hero-inner { min-height: 0; padding-block: 96px; }
  .bento { grid-template-rows: auto; }
  .tile-feature { grid-column: span 12; grid-row: auto; }
  .tile-light, .tile-terra { grid-column: span 6; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .principle:nth-child(3) { padding-left: 0; border-left: 0; }
  .principle:nth-child(2) { padding-right: 0; }
  .about { gap: 56px; }
  .about .section-head { width: auto; }
}

@media (max-width: 820px) {
  .nav-link { display: none; }
  .header-inner { min-height: 80px; }
  .brand img { height: 32px; }
  .section-head.split { flex-direction: column; align-items: flex-start; }
  .tile { padding: 32px; }
  .tile-feature { flex-direction: column; padding: 32px; }
  .phone { width: 220px; height: 440px; }
  .tile-light, .tile-terra { grid-column: span 12; }
  .tile-terra { flex-direction: column; }
  .terrain-grid { align-self: flex-start; }
  .cta-strip { flex-direction: column; align-items: flex-start; padding: 32px; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle:nth-child(n) { padding: 24px 0 0; border-left: 0; }
  .about { flex-direction: column; gap: 40px; }
  .founder { align-self: flex-start; }
  .contact { flex-direction: column; align-items: flex-start; padding-bottom: 72px; }
  .footer-bar { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 20px; }
}

/* "Coming soon" — stands in for an app link until the app ships. Not a link:
   no href, no pointer, no arrow, so nothing invites a click. */
.coming-soon {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* On the dark feature tile, where it replaces a solid white button. */
.coming-soon-badge {
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #C7D3F0;
}

/* The two darker tiles need their own contrast. */
.tile-terra .coming-soon { color: #BDB5A2; }

/* Brand guidelines page ---------------------------------------------------- */
.brand-section { margin-top: 64px; display: flex; flex-direction: column; gap: 12px; }
.brand-section > .h2 { margin-bottom: 20px; }

.logo-suite { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.logo-suite figure { margin: 0; }
.logo-suite figure:first-child { grid-column: span 2; }
.logo-suite .plate {
  height: 140px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.logo-suite .plate-deep { background: var(--navy-deep); border-color: var(--navy-deep); }
.logo-suite .plate img { max-height: 100%; width: auto; }
.logo-suite figcaption { font-size: 15px; color: var(--ink-2); margin-top: 10px; }
.logo-suite figcaption strong { color: var(--navy); font-weight: 600; }

.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.swatch .chip { height: 76px; border-radius: 10px; border: 1px solid transparent; }
.swatch h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin: 12px 0 2px; }
.swatch .hex { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.swatch p:last-child { font-size: 15px; color: var(--ink-2); margin-top: 2px; }

.specimens { display: grid; gap: 18px; }
.specimen { display: flex; align-items: center; gap: 20px; }
.specimen .aa { width: 64px; flex-shrink: 0; font-size: 38px; line-height: 1; color: var(--navy); }
.specimen > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.specimen-name { font-size: 16px; font-weight: 600; color: var(--navy); }
.specimen-use { font-size: 15px; color: var(--ink-2); }

.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.rules h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.rules ul { display: grid; gap: 10px; margin-top: 12px; }
.rules li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.rules svg { flex-shrink: 0; margin-top: 5px; }

.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pillar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.pillar h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.pillar p { font-size: 15px; color: var(--ink-2); }

.statements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.statements .eyebrow { color: var(--navy); margin-bottom: 8px; }
.statement {
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 18px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--navy);
}

@media (max-width: 1180px) {
  .swatches, .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .logo-suite { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules, .statements { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .logo-suite, .swatches, .pillars { grid-template-columns: 1fr; }
  .logo-suite figure:first-child { grid-column: auto; }
}
