/* Vesotel. Design system: see DESIGN.md (source of truth). */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --carbon: #141311;
  --carbon-2: #1f1d1a;
  --cream: #f1ebe0;
  --sand: #e4d9c6;
  --ink: #1b1a17;
  --ink-2: #45413a;
  --muted: #7a7266;
  --on-dark: #f1ebe0;
  --on-dark-2: #b9b2a6;
  --on-dark-3: #8a8378;
  --red: #ec1b24;
  --red-deep: #b5121a;

  --line: rgba(27, 26, 23, 0.16);
  --line-strong: rgba(27, 26, 23, 0.4);
  --line-dark: rgba(241, 235, 224, 0.14);
  --line-dark-strong: rgba(241, 235, 224, 0.32);

  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1360px;
  --section: clamp(80px, 11vw, 152px);
  --header: 68px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.25s;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 8px); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 640; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red); color: var(--on-dark); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--red); color: var(--on-dark); padding: 8px 12px; z-index: 30; }
.skip:focus { top: 8px; }

/* ---------- Surfaces ---------- */

.s-carbon { background: var(--carbon); color: var(--on-dark); }
.s-cream { background: var(--cream); }
.s-sand { background: var(--sand); }

/* ---------- Type helpers ---------- */

.label {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.s-carbon .label { color: var(--on-dark-3); }
.num { color: var(--red); }

.lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.s-carbon .lead { color: var(--on-dark-2); }

.prose p { color: var(--ink-2); max-width: 60ch; }
.prose p + p { margin-top: 1em; }
.prose a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }

/* ---------- Links and actions ---------- */

.link {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.s-carbon .link { text-decoration-color: var(--line-dark-strong); }

.btn {
  display: inline-flex; align-items: center; gap: 0.7em;
  background: var(--red); color: var(--on-dark);
  font-family: var(--sans); font-size: 17px; font-weight: 580;
  padding: 15px 24px; border-radius: 2px; text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--carbon); color: var(--on-dark);
  border-bottom: 1px solid var(--line-dark);
}
.site-header .wrap { display: flex; align-items: center; gap: 48px; height: var(--header); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-dark); }
.brand svg { width: 26px; height: 26px; }
.brand span { font-size: 22px; font-weight: 680; letter-spacing: -0.025em; }

.nav { display: flex; gap: 30px; margin-right: auto; }
.nav a, .header-tel {
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  text-decoration: none; padding: 8px 0; white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav a span:first-child { color: var(--red); margin-right: 8px; }
.nav a.is-active, .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red); }
.header-tel b { font-weight: 500; color: var(--on-dark-3); margin-right: 8px; }

@media (max-width: 860px) {
  :root { --header: 104px; }
  .site-header .wrap { flex-wrap: wrap; height: auto; gap: 0 16px; padding-top: 12px; }
  .brand span { font-size: 20px; }
  .header-tel { margin-left: auto; }
  .header-tel b { display: none; }
  .nav {
    order: 3; width: 100%; margin: 10px 0 0; gap: 22px;
    overflow-x: auto; scrollbar-width: none;
    border-top: 1px solid var(--line-dark); padding: 4px 0 4px;
  }
  .nav::-webkit-scrollbar { display: none; }
}

/* Narrow phones: numbers only; the section in view also shows its name. */
@media (max-width: 600px) {
  .nav { overflow: visible; gap: 22px; }
  .nav a span:first-child { margin-right: 0; }
  .nav a.is-active span:first-child { margin-right: 8px; }
  .nav a:not(.is-active) .nav-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

/* ---------- Grid ---------- */

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 32px; }
.index { grid-column: 1 / span 3; }
.content { grid-column: 4 / -1; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .index, .content { grid-column: 1; }
  .index { margin-bottom: 18px; }
}

.section { padding: var(--section) 0; }

.section-head { margin-bottom: clamp(48px, 6vw, 88px); }
.section-head h2 {
  font-size: clamp(34px, 4.4vw, 68px); line-height: 1.0;
  letter-spacing: -0.03em; font-weight: 660; max-width: 18ch;
}
.section-head h2 em { font-style: normal; color: var(--red); }
.section-head .lead { margin-top: 24px; }

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 8vw, 112px) 0 0; overflow: hidden; }
.hero .grid { align-items: center; row-gap: 56px; }
.hero-main { grid-column: 1 / span 7; }
.hero-art { grid-column: 8 / -1; }
.hero h1 {
  font-size: clamp(42px, 5.8vw, 92px); line-height: 0.98;
  letter-spacing: -0.04em; font-weight: 700; max-width: 14ch;
  margin: 24px 0 32px; color: var(--on-dark);
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { margin-bottom: 40px; }

.hero-bar {
  margin-top: clamp(64px, 8vw, 104px);
  border-top: 1px solid var(--line-dark);
  display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 16px 32px;
  padding: 22px 0 26px;
  font-family: var(--mono); font-size: 14px;
}
.hero-bar > div { display: flex; flex-direction: column; gap: 4px; }
.hero-bar a { text-decoration: none; box-shadow: inset 0 -1px 0 var(--line-dark-strong); align-self: flex-start; transition: box-shadow var(--dur) var(--ease); }
.hero-bar .label { font-size: 11.5px; }

@media (max-width: 1000px) {
  .hero-main, .hero-art { grid-column: 1 / -1; }
  .hero-art { max-width: 620px; }
  .hero-bar { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 520px) {
  .hero-bar { grid-template-columns: 1fr; }
}

/* ---------- Infrastructure diagram ---------- */

.diagram { margin: 0; }
.diagram svg { width: 100%; height: auto; overflow: visible; }
.diagram text { font-family: var(--mono); font-size: 13px; fill: var(--on-dark); }
.diagram .tag { font-size: 11px; fill: var(--red); font-weight: 500; }
.diagram .caption { font-size: 11px; fill: var(--on-dark-3); letter-spacing: 0.08em; }
.diagram .box { fill: var(--carbon-2); stroke: var(--line-dark-strong); stroke-width: 1; }
.diagram .box--key { stroke: var(--red); }
.diagram .wire { fill: none; stroke: var(--line-dark-strong); stroke-width: 1; }
.diagram .wire--vpn { stroke-dasharray: 4 5; }
.diagram .office { fill: none; stroke: var(--line-dark-strong); stroke-width: 1; stroke-dasharray: 2 6; }
.diagram .flow {
  fill: none; stroke: var(--red); stroke-width: 1.5;
  stroke-dasharray: 3 21; animation: flow 7s linear infinite;
}
.diagram .flow--slow { animation-duration: 11s; }
@keyframes flow { to { stroke-dashoffset: -240; } }

.legend { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 20px; font-family: var(--mono); font-size: 12.5px; color: var(--on-dark-2); }
.legend b { color: var(--red); font-weight: 500; margin-right: 6px; }

/* ---------- Services ---------- */

.services { border-bottom: 1px solid var(--line); }
.service {
  position: relative;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 32px;
  padding: clamp(36px, 4.5vw, 64px) 0;
  border-top: 1px solid var(--line);
}
.service::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.service > .num { grid-column: 1 / span 3; font-family: var(--mono); font-size: 14px; font-weight: 500; padding-top: 14px; }
.service-text { grid-column: 4 / span 5; }
.service h3 { font-size: clamp(30px, 3.6vw, 54px); line-height: 1.0; letter-spacing: -0.03em; font-weight: 660; margin-bottom: 20px; }
.service-text p { color: var(--ink-2); max-width: 46ch; }
.service .tasks { grid-column: 9 / -1; align-self: end; }

.tasks li {
  font-family: var(--mono); font-size: 14px; line-height: 1.5;
  padding: 10px 0 10px 1.6em; text-indent: -1.6em;
  border-bottom: 1px solid var(--line);
}
.tasks li:first-child { border-top: 1px solid var(--line-strong); }
.tasks li::before { content: "— "; color: var(--red); }

@media (max-width: 900px) {
  .service { grid-template-columns: 1fr; }
  .service > .num, .service-text, .service .tasks { grid-column: 1; }
  .service > .num { padding-top: 0; }
}

/* ---------- Audit (sand) ---------- */

.audit { border-top: 4px solid var(--red); }
.audit .section-head .lead { max-width: 50ch; }

/* Areas sheet */
.areas { border-top: 1px solid var(--ink); margin-bottom: 72px; }
.areas-head { display: grid; grid-template-columns: 3em minmax(0, 4fr) minmax(0, 7fr); gap: 16px 24px; padding: 12px 0; border-bottom: 1px solid var(--line-strong); align-items: baseline; }
.areas-head .label:first-child { grid-column: 2; }
.areas-head .todo { grid-column: 3; justify-self: start; }
.areas > div:not(.areas-head) { display: grid; grid-template-columns: 3em minmax(0, 4fr) minmax(0, 7fr); gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.area-num { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--red-deep); }
.areas h3 { font-size: 20px; font-weight: 640; letter-spacing: -0.015em; }
.areas p { color: var(--ink-2); font-size: 16px; }

@media (max-width: 640px) {
  .areas-head { grid-template-columns: 2.4em 1fr; }
  .areas-head .label:last-of-type { display: none; }
  .areas-head .todo { grid-column: 2; }
  .areas > div:not(.areas-head) { grid-template-columns: 2.4em 1fr; }
  .areas p { grid-column: 2; }
}

/* Process line */
.steps-line { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 56px; padding-top: 8px; }
.steps-line::before { content: ""; position: absolute; left: 0; right: 0; top: calc(8px + 0.5em * 1.1); height: 1px; background: var(--red); font-size: clamp(56px, 6vw, 96px); }
.steps-line .step-num {
  position: relative; display: inline-block;
  font-size: clamp(56px, 6vw, 96px); line-height: 1.1; font-weight: 300; letter-spacing: -0.04em;
  color: var(--red); background: var(--sand); padding-right: 16px; margin-bottom: 16px;
}
.steps-line h3 { font-size: clamp(21px, 1.8vw, 26px); letter-spacing: -0.015em; font-weight: 640; margin-bottom: 10px; }
.steps-line p { color: var(--ink-2); font-size: 16px; max-width: 32ch; }

@media (max-width: 760px) {
  .steps-line { grid-template-columns: 1fr; gap: 28px; }
  .steps-line::before { display: none; }
  .steps-line li { border-top: 1px solid var(--red); padding-top: 8px; }
  .steps-line .step-num { padding: 0; margin-bottom: 8px; }
}

/* ---------- Group (cream) ---------- */

.group-grid { row-gap: 56px; }
.group-text { grid-column: 4 / span 5; }
.group-facts { grid-column: 9 / -1; }
.ex-client { grid-column: 4 / -1; border-top: 1px solid var(--ink); padding-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; }
.ex-client p { color: var(--ink-2); max-width: 44ch; margin-top: 10px; }
.ex-client .big {
  font-size: clamp(24px, 2.8vw, 42px); font-weight: 600; letter-spacing: -0.025em;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em;
  text-decoration-color: var(--red); justify-self: start;
  transition: color var(--dur) var(--ease);
}
.principles { grid-column: 4 / -1; }

@media (max-width: 900px) {
  .group-text, .group-facts, .ex-client, .principles { grid-column: 1; }
  .ex-client { grid-template-columns: 1fr; }
}

.rows > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { font-size: 21px; font-weight: 640; letter-spacing: -0.015em; }
.rows p { color: var(--ink-2); max-width: 58ch; }

@media (max-width: 760px) {
  .rows > div { grid-template-columns: 1fr; }
}

/* ---------- Sheet (definition rows) ---------- */

.sheet { border-top: 1px solid currentColor; }
.sheet > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sheet dt { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.sheet dd { font-family: var(--mono); font-size: 14.5px; }
.sheet dd a { text-decoration: none; box-shadow: inset 0 -1px 0 var(--line-strong); transition: box-shadow var(--dur) var(--ease); }
.s-carbon .sheet > div { border-bottom-color: var(--line-dark); }
.s-carbon .sheet dt { color: var(--on-dark-3); }
.s-carbon .sheet dd a { box-shadow: inset 0 -1px 0 var(--line-dark-strong); }

@media (max-width: 480px) {
  .sheet > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Contact (carbon) ---------- */

.contact h2 { color: var(--on-dark); }
.contact-grid { row-gap: 56px; }
.paths { grid-column: 1 / span 7; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--on-dark); }
.path { padding: 28px 32px 0 0; }
.path + .path { border-left: 1px solid var(--line-dark); padding-left: 32px; }
.path h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 640; letter-spacing: -0.015em; margin: 14px 0 12px; }
.path p { color: var(--on-dark-2); margin-bottom: 24px; max-width: 40ch; }
.path p a { color: var(--on-dark); text-underline-offset: 0.2em; text-decoration-color: var(--line-dark-strong); }
.contact-data { grid-column: 9 / -1; }

@media (max-width: 1000px) {
  .paths, .contact-data { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .paths { grid-template-columns: 1fr; }
  .path, .path + .path { border-left: 0; padding: 28px 0; }
  .path + .path { border-top: 1px solid var(--line-dark); }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--carbon); color: var(--on-dark-2); border-top: 1px solid var(--line-dark); font-size: 15px; }
.footer-main { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; padding: 56px 0 48px; }
.footer-brand { grid-column: 1 / span 4; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { max-width: 32ch; }
.footer-col { grid-column: span 3; }
.footer-col:last-child { grid-column: span 2; }
.footer-col .label { color: var(--on-dark-3); display: block; margin-bottom: 12px; }
.footer-col li { font-family: var(--mono); font-size: 14px; padding: 3px 0; }
.site-footer a { text-decoration: none; transition: color var(--dur) var(--ease); }
.group-sign { margin-top: 20px; font-family: var(--mono); font-size: 13.5px; }
.group-sign a { color: var(--on-dark); }
.footer-legal { border-top: 1px solid var(--line-dark); padding: 20px 0 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--mono); font-size: 12.5px; color: var(--on-dark-3); }
.footer-legal nav { display: flex; gap: 20px; }

@media (max-width: 900px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col, .footer-col:last-child { grid-column: span 1; }
}

/* ---------- Inner pages (legal, 404) ---------- */

.page-head { padding: clamp(56px, 7vw, 104px) 0 clamp(40px, 5vw, 72px); }
.page-head h1 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1.0; letter-spacing: -0.035em; font-weight: 680; max-width: 18ch; }
.page-head .lead { margin-top: 24px; }
.page-404 { padding-bottom: var(--section); }
.page-404 .actions { margin-top: 36px; }

.legal { padding-bottom: var(--section); }
.legal .body { max-width: 70ch; }
.legal h2 { font-size: 22px; letter-spacing: -0.015em; font-weight: 640; margin: 48px 0 12px; }
.legal h2.first { margin-top: 0; }
.legal p { color: var(--ink-2); }
.legal p + p { margin-top: 0.9em; }
.legal .sheet { margin-top: 16px; }
.legal a { text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); }

/* ---------- Pending data ---------- */

.todo { background: #fff07a; color: #4a3d00; padding: 0 4px; font-family: var(--mono); font-size: 0.85em; }

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

/* ---------- Hover (mouse only) ----------
   Touch screens keep :hover "stuck" after a tap (iOS Safari), so hover
   styles only apply to devices with a real pointer. */

@media (hover: hover) and (pointer: fine) {
  .prose a:hover { text-decoration-color: var(--red); }
  .link:hover { text-decoration-color: var(--red); }
  .s-carbon .link:hover { text-decoration-color: var(--red); }
  .btn:hover { background: var(--red-deep); }
  .nav a:not(.is-active):not([aria-current="page"]):hover { box-shadow: inset 0 -2px 0 var(--line-dark-strong); }
  .header-tel:hover { color: #fff8ee; box-shadow: inset 0 -2px 0 var(--red); }
  .hero-bar a:hover { box-shadow: inset 0 -1px 0 var(--red); }
  .service:hover::before { transform: scaleX(1); }
  .ex-client .big:hover { color: var(--red-deep); }
  .sheet dd a:hover { box-shadow: inset 0 -1px 0 var(--red); }
  .s-carbon .sheet dd a:hover { box-shadow: inset 0 -1px 0 var(--red); }
  .path p a:hover { text-decoration-color: var(--red); }
  .site-footer a:hover { color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 0.3em; }
  .legal a:hover { text-decoration-color: var(--red); }
}
