/* ==================================================================
   FIEX Web3 2.2.0 · home (Route 1 "Oneindige agents", example team)
   Source: design/mockups/home-ai-architect.html (v4, view "Voorstel B"), Route 1 only.
   Not shipped from the mockup: review bar, Routes 2 and 3, language switch.

   Contrast (WCAG 2.x), light:
     --ink          #3a3a3a on --bg #ffffff 11.37:1 · on --tag #e9f2ef 9.97:1
     --muted        #5b6461 on --bg 6.10:1 · on --tag 5.35:1  (also the 11px agent labels)
     --link/--focus #3a6f61 on --bg 5.79:1 · on --tag 5.08:1
     --on-accent    #1b1f1d on --accent #81b9aa 7.50:1 · on --accent-hover #6aa898 6.08:1
     --control-line #6b7b75 on --tag 3.90:1 · on --bg 4.45:1
     --accent       #81b9aa on --bg 2.22:1 -> fill only (agent tags, social buttons, eyelets)
     --cord         #9db2ab decorative only (the string through the eyelets)
     logo lettering black on #81b9aa 9.45:1 (logo has a transparent background)
   Contrast, dark:
     --ink #e7ece9 on --bg #121614 15.27:1 · on --tag #1c2622 13.02:1
     --muted #aab4af 8.57:1 · 7.30:1 · --link/--focus #9fd0c2 10.67:1 · 9.09:1
     --on-accent #121614 on --accent 8.22:1 · on --accent-hover #9fd0c2 10.67:1
     --control-line #7d918a on --tag 4.66:1 · --cord #4f615a decorative
   ================================================================== */

/* ==================================================================
   Fonts: self-hosted (fontsource 5.3.0, SIL OFL 1.1, see ../fonts/)
   ================================================================== */
@font-face {
  font-family: "Abril Fatface";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/abril-fatface-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Abril Fatface";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/abril-fatface-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/roboto-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==================================================================
   Tokens
   ================================================================== */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #3a3a3a;
  --muted: #5b6461;
  --accent: #81b9aa;
  --accent-hover: #6aa898;
  --on-accent: #1b1f1d;
  --link: #3a6f61;
  --focus: #3a6f61;
  --tag: #e9f2ef;
  --control-line: #6b7b75;
  --control-hover: #ffffff;
  --cord: #9db2ab;

  --font-display: "Abril Fatface", Georgia, "Times New Roman", serif;
  --font-text: "Roboto", Arial, Helvetica, sans-serif;
  --step--2: 0.6875rem;  /* 11px agent labels */
  --step--1: 0.875rem;   /* 14px small lines, buttons */
  --step-0: 1rem;        /* 16px */
  --step-1: 1.1875rem;   /* 19px address */
  --display-1: clamp(1.875rem, 1.2rem + 2.9vw, 3.5rem);   /* 30 -> 56px */
  --leading-tight: 1.06;
  --leading-body: 1.55;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;

  --radius-tag: 14px;
  --radius-control: 999px;
  --radius-focus: 4px;
  --hole: 14px;
  --ease: 160ms ease-out;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121614;
    --ink: #e7ece9;
    --muted: #aab4af;
    --accent: #81b9aa;
    --accent-hover: #9fd0c2;
    --on-accent: #121614;
    --link: #9fd0c2;
    --focus: #9fd0c2;
    --tag: #1c2622;
    --control-line: #7d918a;
    --control-hover: #263330;
    --cord: #4f615a;
  }
}

/* ==================================================================
   Base
   ================================================================== */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fx, .fx * { box-sizing: border-box; }
.fx :where(h1, h2, p, ul) { margin: 0; padding: 0; }
.fx [hidden] { display: none !important; }
.fx :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.fx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* SVG sprite holder: takes no space, replaces the mockup's inline style attribute */
.fx-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fx {
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
}

/* ==================================================================
   Shared pieces
   ================================================================== */
.r {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: clamp(var(--space-6), 5vh, var(--space-7));
}

/* The mockup draws the logo as a CSS background; here it is an <img> with the same box */
.fx-logo {
  display: block;
  width: var(--logo-size, 96px);
  height: auto;
  aspect-ratio: 505 / 499;
}

.fx-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--ink);
  text-wrap: balance;
}

.fx-name {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.fx-small {
  font-size: var(--step--1);
  color: var(--muted);
}

.fx-mail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  max-width: 100%;
}

.fx-mail {
  color: var(--link);
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.3;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  border-radius: var(--radius-focus);
  overflow-wrap: anywhere;
  transition: text-decoration-thickness var(--ease);
}

.fx-mail:hover { text-decoration-thickness: 2px; }
.fx-mail span { user-select: text; -webkit-user-select: text; }

.fx-copy {
  display: inline-grid;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  font: 500 var(--step--1) / 1 var(--font-text);
  letter-spacing: 0.02em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

/* all state labels share one grid cell, so the button keeps its width */
.fx-copy > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  visibility: hidden;
}

.fx-copy[data-state="idle"] .fx-copy-idle,
.fx-copy[data-state="copied"] .fx-copy-done,
.fx-copy[data-state="selected"] .fx-copy-sel { visibility: visible; }

.fx-copy svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fx-copy:hover { background: var(--control-hover); border-color: var(--ink); }

.fx-copy[data-state="copied"],
.fx-copy[data-state="selected"] { color: var(--link); border-color: var(--link); }

.fx-copy:disabled { cursor: not-allowed; opacity: 0.6; }

.fx-social {
  display: flex;
  gap: var(--space-4);
}

.fx-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  transition: background-color var(--ease), transform var(--ease);
}

.fx-social a:hover { background: var(--accent-hover); transform: translateY(-2px); }
.fx-social a:active { transform: translateY(0); }
.fx-social svg { width: 20px; height: 20px; fill: currentColor; }

/* The contact tag with its eyelet */
.fx-tag {
  position: relative;
  display: grid;
  gap: var(--space-2);
  max-width: 100%;
  background: var(--tag);
  border-radius: var(--radius-tag);
}

.fx-tag::before {
  /* eyelet: shows the page through, ringed in brand sage */
  content: "";
  position: absolute;
  width: var(--hole);
  height: var(--hole);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ==================================================================
   Route 1 · Oneindige agents: 17 small tags on one cord, one human tag
   ================================================================== */
.r1 {
  --logo-size: clamp(64px, 4vw + 44px, 84px);
  display: grid;
  justify-items: center;
  gap: var(--space-6);
  text-align: center;
}

.r1-head {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}

.r1-title {
  font-size: var(--display-1);
  max-width: 22ch;
}

/* one sentence per line ("Oneindige agents." / "Eén architect: FIEX."); a narrow
   screen may still wrap the second sentence, balanced */
.r1-title-line { display: block; }

.r1-team {
  --agent: 26px;          /* tag size */
  --agent-col: 36px;      /* column width; cord is drawn per column so it runs unbroken */
  /* 2.2.0, no supporting line: extra air below the h1 so it does not sit on the cord;
     on top of the 32px grid gap: 0px at 360, ~7px at 768, 16px from 1120 */
  margin-top: clamp(0px, 2.5vw - 12px, var(--space-4));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(9 * var(--agent-col));
  list-style: none;
}

.r1-team li {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--space-2);
  width: var(--agent-col);
  padding-bottom: var(--space-3);
}

.r1-team li::before {
  /* the cord, threaded through every eyelet (eyelet centre = 19% of the tag height) */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--agent) * 0.19 - 0.5px);
  height: 1px;
  background: var(--cord);
}

.r1-team svg {
  position: relative;
  width: var(--agent);
  height: var(--agent);
  fill: var(--accent);
  fill-rule: evenodd;
}

.r1-role {
  font-size: var(--step--2);
  line-height: 1.25;
  color: var(--muted);
  /* min-content: a label breaks only at a space or hyphen (two words = two lines), never inside a word;
     the longest single word ("Aanmaningen", 68px) fits the 72px column */
  width: min-content;
  hyphens: manual;
}

/* below 600px the role names stay in the accessibility tree but are not drawn */
@media (max-width: 599px) {
  .r1-role {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (min-width: 600px) {
  .r1-team { --agent: 34px; --agent-col: 72px; max-width: calc(9 * var(--agent-col)); }
}

@media (min-width: 1180px) {
  .r1-team { max-width: none; }
}

.r1-tag {
  justify-items: center;
  padding: calc(var(--space-3) + var(--hole) + var(--space-4)) var(--space-6) var(--space-5);
}

.r1-tag::before { top: var(--space-3); left: 50%; translate: -50% 0; }
.r1-tag .fx-mail-row { justify-content: center; }

@media (max-width: 479px) {
  .r1 { gap: var(--space-6); }
  .r1-tag { width: 100%; padding-inline: var(--space-4); }
}

/* ==================================================================
   Motion
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
  .fx *, .fx *::before { transition: none !important; }
  .fx-social a:hover { transform: none; }
}
