@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/hanken-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/hanken-latin.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;
}

/* Aveiro's colours: moliceiro paint, the ria, salt, hull black. */
:root {
  --salt: #f3f4f1;
  --salt-step: #e4e7e2;
  --ink: #111111;
  --yellow: #f4c430;
  --blue: #5aa9e6;
  --green: #4fae74;
  --green-step: #6dbf8c;
  --green-light: #9fd8b3;
  --black: #151515;
  --red: #c8202a;
  --red-strong: #a8161f;
  --paper-ink: #f3f4f1;

  /* Five working sizes, plus the hero name. */
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-statement: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.25rem, 8.6vw, 8.25rem);

  --m: clamp(16px, 2.4vw, 32px);
  --bar: 56px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--bar); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--salt);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: var(--step-body);
  line-height: 1.45;
  letter-spacing: -0.005em;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
::selection { background: var(--ink); color: var(--yellow); }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-color: currentColor; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--salt); padding: 10px 14px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.f-yellow { background: var(--yellow); color: var(--ink); }
.f-blue { background: var(--blue); color: var(--ink); }
.f-green { background: var(--green); color: var(--ink); }
.f-black { background: var(--black); color: var(--paper-ink); }
.f-salt { background: var(--salt); color: var(--ink); }
.f-salt-step { background: var(--salt-step); color: var(--ink); }
.f-red { background: var(--red); color: #fff; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--red); color: #fff;
  font: inherit; font-weight: 500; text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .button:hover { background: var(--red-strong); text-decoration: none; } }

/* Fixed bar: takes the colours of the chapter beneath it. */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--m);
  background: var(--bar-bg, var(--salt)); color: var(--bar-ink, var(--ink));
  transition: background-color 300ms ease, color 300ms ease, transform 400ms var(--ease-out);
}
.bar a { text-decoration: none; font-weight: 500; }
.bar .bar-action { text-decoration: underline; text-decoration-color: currentColor; }
.js .bar:not(.is-shown) { transform: translateY(-100%); }

/* Hero: photograph panel with a swatch column that is also the navigation. */
.hero { min-height: 100svh; padding: 10px; display: grid; grid-template-columns: minmax(0, 10fr) minmax(0, 2fr); }
.hero-panel { position: relative; overflow: hidden; color: var(--paper-ink); display: flex; flex-direction: column; justify-content: flex-end; }
.hero-panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-panel::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.5)); } /* taste-skill-ignore: neutral scrim under text on the photograph */
.hero-panel > :not(img) { position: relative; z-index: 2; }
.hero h1 { position: absolute; left: 0; right: 0; top: 16%; padding: 0 var(--m); font-size: var(--step-display); line-height: 0.9; text-align: center; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 [data-line] { display: block; }
.hero-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 16px; padding: 0 28px 36px; }
.hero-foot p { grid-column: 1 / span 4; max-width: 36ch; }
.hero-foot .button { grid-column: 6 / span 2; justify-self: center; white-space: nowrap; background: var(--paper-ink); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .hero-foot .button:hover { background: var(--yellow); } }

.swatches { display: grid; grid-template-rows: repeat(4, 1fr); }
.swatches a { padding: 20px; font-weight: 500; text-decoration: none; }
.swatches a span { display: inline-block; transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .swatches a:hover span { transform: translateX(6px); } }
.hero-lede-phone { display: none; }

/* Intro: the sovereign AI statement and its three commitments, on hull black. */
.intro {
  min-height: 100svh; padding: calc(var(--bar) + 12vh) var(--m) 12vh;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 14vh; align-content: center;
}
.stair { grid-column: 1 / -1; font-size: var(--step-statement); font-weight: 500; line-height: 1.12; letter-spacing: -0.03em; }
.stair span { display: block; }
.stair span:nth-child(1) { color: var(--yellow); }
.stair span:nth-child(2) { padding-left: 8vw; }
.stair span:nth-child(3) { padding-left: 16vw; }
.pledges { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pledges h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.15; color: var(--yellow); margin-bottom: 12px; }
.pledges p { max-width: 34ch; }

/* Services: one colour band per practice. */
.services-head { padding: 18vh var(--m) 10vh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
.services-head h2 { grid-column: 1 / span 6; font-size: var(--step-head); }
.services-head p { grid-column: 8 / span 4; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.015em; }
.band { min-height: 64svh; padding: 12vh var(--m); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; align-content: center; }
.band h3 { grid-column: 1 / -1; font-size: var(--step-display); line-height: 0.9; }
.band-lede { grid-column: 1 / span 6; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.015em; max-width: 30ch; }
.band-list { grid-column: 8 / span 5; display: grid; gap: 10px; align-self: end; }
.band-list li { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.015em; }

/* How we work: four steps that descend like stairs. */
.process { padding: 18vh var(--m) 22vh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 10vh; }
.process > h2 { grid-column: 1 / span 6; font-size: var(--step-head); }
.steps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.step:nth-child(2) { margin-top: 8vh; }
.step:nth-child(3) { margin-top: 16vh; }
.step:nth-child(4) { margin-top: 24vh; }
.step h3 { font-size: var(--step-statement); letter-spacing: -0.03em; line-height: 1.05; }
.step-time { font-weight: 500; margin: 10px 0 16px; }
.step p:last-child { max-width: 30ch; }

/* Company: inset panel with the registered details. */
.company { padding: 20px; }
.company-panel { min-height: 100svh; padding: 56px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: 24px; row-gap: 10vh; }
.company-panel h2 { grid-column: 1 / span 6; font-size: var(--step-head); color: var(--yellow); }
.company-facts { grid-column: 1 / span 6; grid-row: 2; align-self: end; display: grid; gap: 22px; }
.company-facts div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; }
.company-facts dt { color: var(--yellow); }
.company-facts dd { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.015em; }
.company-text { grid-column: 8 / -1; grid-row: 1 / span 2; display: grid; gap: 64px; align-content: start; max-width: 360px; }
.company-text h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 12px; }
.company-text .button { justify-self: start; }

/* Contact: heading and a three-cell bar. */
.contact { min-height: 80svh; padding: 18vh var(--m) 14vh; }
.contact h2 { font-size: var(--step-head); margin-bottom: 20px; }
.contact-lede { margin-bottom: 40px; max-width: 46ch; }
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cell {
  height: 96px; width: 100%; border: 0; border-radius: 0;
  font: inherit; text-align: center; color: var(--ink);
  background: var(--green-step);
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
  appearance: none; -webkit-appearance: none;
}
.cell::placeholder { color: #1d3b29; opacity: 1; }
.cell:focus { outline: none; background: var(--green-light); }
.cell:focus-visible { outline: 3px solid var(--ink); outline-offset: 0; }
select.cell { text-align-last: center; cursor: pointer; }
.cell-submit { background: var(--black); color: var(--paper-ink); font-weight: 500; cursor: pointer; }
.cell-submit:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .cell-submit:hover { background: var(--red); } }
.small-print { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.small-print p:last-child { grid-column: 3; }

/* Footer of tiles. */
.footer { padding: 10px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.tile-f { min-height: 220px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.t-statement { grid-column: 1 / span 4; }
.t-statement p:first-child { font-size: var(--step-lead); line-height: 1.25; letter-spacing: -0.015em; max-width: 24ch; }
.t-legal { font-size: var(--step-small); }
.t-nav { grid-column: 5 / span 4; }
.t-nav ul { display: grid; gap: 6px; }
.t-time { grid-column: 9 / span 4; }
.t-time .clock { display: block; font-size: var(--step-lead); font-variant-numeric: tabular-nums; margin-top: 6px; }
.t-time a { overflow-wrap: anywhere; }
.t-wordmark { grid-column: 1 / span 8; min-height: 320px; justify-content: center; align-items: center; }
.t-wordmark p { font-size: var(--step-display); font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; text-align: center; }
.t-wordmark span { display: block; }
.t-action { grid-column: 9 / span 4; min-height: 320px; text-decoration: none; transition: background-color var(--t-hover) ease; }
.t-action span { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
.t-action svg { align-self: flex-end; width: 64px; height: 64px; transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .t-action:hover { background: var(--red-strong); } .t-action:hover svg { transform: translate(6px, -6px); } }
.credits { grid-column: 1 / -1; padding: 20px 20px 28px; }
.credits h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 12px; }
.credits ul { columns: 2 24rem; column-gap: 32px; }
.credits li { margin-bottom: 6px; break-inside: avoid; }

/* Privacy page. */
.prose { padding: calc(var(--bar) + 10vh) var(--m) 14vh; }
.prose > * { max-width: 40rem; }
.prose h1 { font-size: var(--step-head); margin-bottom: 16px; }
.prose .updated { margin-bottom: 48px; }
.prose h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.15; margin: 40px 0 12px; }
.prose p { margin-bottom: 14px; }
.prose a { text-decoration-color: currentColor; }

/* Phone and tablet compositions. */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 8px; min-height: 0; }
  .hero-panel { height: 64svh; min-height: 420px; justify-content: flex-end; }
  .hero h1 { font-size: 12vw; top: 22%; }
  .hero-foot { display: flex; justify-content: center; padding: 0 20px 28px; }
  .hero-foot p { display: none; }
  .swatches { grid-template-rows: none; }
  .swatches a { height: 52px; padding: 0 20px; display: flex; align-items: center; }
  .hero-lede-phone { display: block; grid-column: 1 / -1; font-size: var(--step-lead); line-height: 1.3; }

  .intro { grid-template-columns: 1fr; min-height: 0; padding: calc(var(--bar) + 48px) var(--m) 80px; row-gap: 48px; }
  .stair span:nth-child(2) { padding-left: 5vw; }
  .stair span:nth-child(3) { padding-left: 10vw; }
  .pledges { grid-template-columns: 1fr; gap: 32px; }

  .services-head { grid-template-columns: 1fr; padding: 96px var(--m) 56px; row-gap: 16px; }
  .services-head > *, .band > * { grid-column: 1 / -1 !important; }
  .band { grid-template-columns: 1fr; min-height: 0; padding: 72px var(--m); row-gap: 24px; }
  .band h3 { font-size: 13vw; }
  .band-list li { font-size: var(--step-body); }

  .process { grid-template-columns: 1fr; padding: 96px var(--m); row-gap: 48px; }
  .process > h2 { grid-column: 1; }
  .steps { grid-column: 1; grid-template-columns: 1fr; row-gap: 40px; }
  .step:nth-child(2) { margin: 0 0 0 6vw; }
  .step:nth-child(3) { margin: 0 0 0 12vw; }
  .step:nth-child(4) { margin: 0 0 0 18vw; }

  .company { padding: 10px; }
  .company-panel { grid-template-columns: 1fr; grid-template-rows: none; padding: 32px 20px 40px; min-height: 0; row-gap: 40px; }
  .company-panel h2 { font-size: 8.5vw; }
  .company-panel > * { grid-column: 1 !important; grid-row: auto !important; }
  .company-facts div { grid-template-columns: 1fr; gap: 2px; }
  .company-text { max-width: none; gap: 32px; }

  .contact { min-height: 0; padding: 96px var(--m); }
  .cells { grid-template-columns: 1fr; }
  .cell { height: 60px; }
  .small-print { grid-template-columns: 1fr; }
  .small-print p:last-child { grid-column: 1; }

  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; }
  .t-wordmark { grid-column: 1 / -1; order: -2; min-height: 160px; }
  .t-wordmark p { font-size: 12vw; }
  .t-action { grid-column: 1 / -1; order: -1; min-height: 160px; }
  .t-nav { grid-column: 1; }
  .t-time { grid-column: 2; }
  .t-statement { grid-column: 1 / -1; }
  .tile-f { min-height: 180px; }
  .t-statement p:first-child { font-size: var(--step-body); }
}
@media (max-width: 480px) {
  .footer > .t-time, .footer > .t-statement, .footer > .t-nav { grid-column: 1 / -1; }
}

/* Motion. Hidden states only apply once the script has run. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js .hero-panel > img { animation: settle 2400ms var(--ease-soft) both; }
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise 700ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 450ms); }

  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 600ms var(--ease-in-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .shutter.is-in { clip-path: inset(0); }

}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.08); } to { transform: none; } }
