/* Gamma Quest site styles. One light theme: colors are set explicitly. */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* Layout: a drafting-paper hero (faint grid), then alternating white and pale-steel bands.
   Technology names are set like code tags, project figures in mono: the shop's own vocabulary. */
:root {
  --ink: #0F1A2B;
  --cobalt: #2147C7;
  --cobalt-dark: #1A389E;
  --tint: #E6ECFB;
  --amber: #F2B44A;
  --steel: #F2F4F7;
  --paper: #FFFFFF;
  --slate: #4E5B6E;
  --line: #DCE1E9;
  --night: #0F1A2B;
  --night-text: #C9D2E0;
  --display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --max: 1160px;
  --radius: 12px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--cobalt-dark); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.125rem, 2vw, 1.3rem); color: var(--slate); max-width: 44rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 520px) { .wrap { padding-inline: 16px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.label { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cobalt); margin: 0 0 14px; }
.label::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-right: 10px; vertical-align: 1px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.97rem; padding: 6px 0; }
.nav a:hover { color: var(--cobalt); }
.nav a[aria-current="page"] { color: var(--cobalt); box-shadow: inset 0 -2px 0 var(--cobalt); }
.nav .ext::after { content: " \2197"; font-size: 0.85em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 12px 22px; border-radius: 10px; border: 0; background: var(--cobalt); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--cobalt-dark); color: #fff; }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.nav a.btn, .nav a.btn:hover { color: #fff; box-shadow: none; }

/* Sections */
section { padding-block: 84px; }
.band { background: var(--steel); }
.hero { position: relative; padding-block: 104px 88px; overflow: hidden;
  background-color: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px; background-position: -1px -1px; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.92) 45%, rgba(255,255,255,0.55) 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 15em; }
.hero h1 em { font-style: normal; color: var(--cobalt); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.page-hero { padding-block: 88px 40px; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 18em; }
.section-head { display: grid; gap: 8px 48px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; margin-bottom: 40px; }
.section-head .lead { margin: 0; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 56px; border-top: 1px solid var(--ink); }
.facts div { padding: 16px 16px 0 0; }
.facts dt { font-size: 0.9rem; color: var(--slate); }
.facts dd { margin: 0; font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; order: -1; }
.facts div { display: flex; flex-direction: column; }

/* Service cards */
.services { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.service { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.band .service { background: var(--paper); }
.service h3 { margin: 0; }
.service p { margin: 0; color: var(--slate); font-size: 0.98rem; }
.service .num { font-family: var(--mono); font-size: 0.8rem; color: var(--cobalt); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; list-style: none; padding-left: 0; }
.tags li { font-family: var(--mono); font-size: 0.74rem; background: var(--tint); color: var(--cobalt-dark); padding: 3px 8px; border-radius: 6px; }
.service.feature { background: var(--night); border-color: var(--night); color: #fff; }
.service.feature p { color: var(--night-text); }
.service.feature .num { color: var(--amber); }
.service.feature a { color: #fff; }

/* Work */
.work { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 420px) { .work { grid-template-columns: 1fr; } }
.project { border-top: 3px solid var(--ink); padding-top: 18px; min-width: 0; }
.project .kind { font-family: var(--mono); font-size: 0.78rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.project h3 { margin-bottom: 8px; }
.project p { color: var(--slate); font-size: 0.98rem; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 12px; padding: 0; list-style: none; }
.metrics li { font-family: var(--mono); font-size: 0.85rem; color: var(--ink); }
.metrics b { font-family: var(--display); font-size: 1.35rem; margin-right: 6px; color: var(--cobalt); }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; padding-top: 18px; border-top: 1px solid var(--ink); }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--mono); color: var(--cobalt); font-size: 0.85rem; margin-bottom: 8px; }
.steps strong { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 6px; }
.steps p { color: var(--slate); font-size: 0.97rem; margin: 0; }

/* Detail blocks on inner pages */
.detail { display: grid; gap: 12px 56px; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); padding-block: 44px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.detail:first-of-type { border-top: 0; }
.detail ul { margin: 0 0 1em; padding-left: 1.2em; }
.detail li { margin-bottom: 6px; }
.detail .side p { color: var(--slate); font-size: 0.98rem; }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } }

/* Team */
.team { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.person { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--paper); }
.person h3 { margin-bottom: 2px; font-size: 1.12rem; }
.person .role { color: var(--cobalt); font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; }
.person p { color: var(--slate); font-size: 0.93rem; margin: 0 0 8px; }

/* CTA band */
.cta-band { background: var(--night); color: #fff; }
.cta-band .lead { color: var(--night-text); }
.cta-band .btn { background: var(--amber); color: var(--ink); }
.cta-band .btn:hover { background: #F6C670; color: var(--ink); }
.cta-band .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.cta-band .btn.ghost:hover { background: #fff; color: var(--ink); }
.cta-band a:not(.btn) { color: #fff; }

/* Contact */
.contact-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
.form .row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--slate); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #A7B0BE; border-radius: 10px; padding: 11px 12px; min-height: 48px; }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--tint); border-color: var(--cobalt); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.6em; font-weight: 600; }
.status.ok { color: #1F7A4D; }
.status.err { color: #B4321F; }
.aside { background: var(--steel); border-radius: var(--radius); padding: 26px; }
.aside h3 { margin-top: 0; }
.aside ol { padding-left: 1.2em; margin: 0 0 1em; }
.aside li { margin-bottom: 8px; }

/* Footer */
.site-footer { background: var(--night); color: var(--night-text); padding-block: 56px 40px; font-size: 0.93rem; }
.site-footer .wrap { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; font-size: 1.2rem; }
.site-footer h4 { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; margin: 4px 0 12px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 10px 0 0; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid #263450; padding-top: 18px; font-size: 0.85rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* About: lead architect and skills */
.lead-card { display: grid; gap: 16px 56px; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); border-left: 6px solid var(--cobalt); }
.lead-card h2 { margin-bottom: 14px; }
.lead-card p { color: var(--slate); }
@media (max-width: 820px) { .lead-card { grid-template-columns: 1fr; padding: 24px; } }
.skills { display: grid; gap: 28px 40px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 420px) { .skills { grid-template-columns: 1fr; } }
.skill-group { border-top: 1px solid var(--ink); padding-top: 14px; }
.skill-group h3 { font-size: 1.05rem; margin-bottom: 10px; }
.skill-group .tags { padding-top: 0; }

/* Layout fixes: featured card spans the row; titles read as headings; work in two columns */
.service.feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px 48px; align-items: start; padding: 34px; }
.service.feature > .num, .service.feature > h3 { grid-column: 1; }
.service.feature > p, .service.feature > .tags { grid-column: 2; }
.service.feature > .num { grid-row: 1; } .service.feature > h3 { grid-row: 2; font-size: 1.7rem; }
.service.feature > p:first-of-type { grid-row: 1 / span 2; margin: 0; font-size: 1.05rem; }
.service.feature > .tags { grid-row: 3; margin-top: 0; padding-top: 0; }
.service.feature > p:last-of-type { grid-row: 3; grid-column: 1; margin: 0; align-self: end; }
@media (max-width: 760px) { .service.feature { grid-template-columns: 1fr; } .service.feature > * { grid-column: 1 !important; grid-row: auto !important; } }
.service h3 a { color: var(--ink); text-decoration: none; }
.service h3 a:hover { color: var(--cobalt); text-decoration: underline; }
.work { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 36px 40px; }
@media (max-width: 480px) { .work { grid-template-columns: 1fr; } }

/* Core technology stack */
.stack { display: grid; gap: 22px 32px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.stack-item { border-top: 1px solid var(--ink); padding-top: 14px; min-width: 0; }
.stack-item h3 { font-size: 1.02rem; margin-bottom: 10px; }
.stack-item .tags { padding-top: 0; margin-top: 0; }
.stack.notes { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px 40px; }
.stack.notes .stack-item p { color: var(--slate); font-size: 0.95rem; margin: 12px 0 0; }

/* Team: architect and engineering partner */
.team-duo { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: stretch; }
@media (max-width: 820px) { .team-duo { grid-template-columns: 1fr; } }
.team-duo .person { padding: 28px; }
.partner-card { background: var(--night); color: #fff; border-radius: var(--radius); padding: 30px; }
.partner-card .label { color: var(--amber); }
.partner-card h3 { font-size: 1.6rem; margin-bottom: 10px; }
.partner-card p { color: var(--night-text); margin: 0 0 12px; }
.partner-card a { color: #fff; font-weight: 600; }
ul.plain { margin: 0; padding-left: 1.2em; color: var(--slate); font-size: 0.97rem; }
ul.plain li { margin-bottom: 6px; }
.person .avatar { width: 112px; height: 140px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; box-shadow: 8px 8px 0 var(--tint); }

/* Header: pinned; on phones the links fold into a menu button */
html { scroll-padding-top: 84px; }
.site-header .wrap { flex-wrap: nowrap; }
.site-header .nav { margin-left: auto; }
.header-cta, .header-cta:hover { color: #fff; text-decoration: none; flex-shrink: 0; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--ink); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 1px; transition: transform .2s ease, background-color .2s ease; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }
  .site-header .wrap { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  .brand { margin-right: auto; font-size: 1.15rem; gap: 10px; }
  .brand img { width: 30px; height: 30px; }
  .header-cta { min-height: 44px; padding: 8px 14px; font-size: 0.92rem; }
  .menu-btn { display: inline-flex; }
  .site-header .nav { display: none; order: 3; width: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); padding-top: 4px; }
  .menu-open .site-header .nav { display: flex; }
  .site-header .nav a { padding: 12px 2px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .site-header .nav a:last-child { border-bottom: 0; }
  .site-header .nav a[aria-current="page"] { box-shadow: none; font-weight: 600; }
}
@media (prefers-reduced-motion: reduce) { .menu-icon, .menu-icon::before, .menu-icon::after { transition: none; } }
@media (max-width: 900px) {
  .site-header .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px; }
  .site-header .nav { grid-column: 1 / -1; }
  .brand { min-width: 0; white-space: nowrap; font-size: 1.05rem; }
  .header-cta { padding: 8px 12px; font-size: 0.88rem; }
}
.menu-open .site-header { background: var(--paper); backdrop-filter: none; }
