@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-style: normal; font-weight: 300 600; font-display: swap;
}

:root {
  --bg: #f4f5f6;
  --ink: #121417;
  --muted: #5b6168;
  --line: #d8dbdf;
  --hover: #eaecee;
  --accent: #e0341a;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0f;
    --ink: #ecedee;
    --muted: #959ba3;
    --line: #25282d;
    --hover: #15171a;
    --accent: #ff5634;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: #fff; }

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

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 28px; padding-bottom: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 500; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg { width: 22px; height: 22px; flex: none; }
.top nav { display: flex; gap: 24px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.top nav a:hover { color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding-top: clamp(40px, 9vw, 120px);
  padding-bottom: clamp(64px, 10vw, 140px);
}
.eyebrow {
  font-size: 14px; color: var(--muted); margin: 0 0 20px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none;
}
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 10vw, 8.6rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin: 0;
}
h1 em { font-style: italic; }
h1 .dot { color: var(--accent); }
.lede {
  max-width: 34ch;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  margin: 32px 0 0;
}
.lede strong { color: var(--ink); font-weight: 400; }

.clock { margin: 0; justify-self: center; width: 100%; max-width: 380px; }
.clock svg { display: block; width: 100%; height: auto; overflow: visible; }
.clock .face { fill: none; stroke: var(--line); stroke-width: 1; }
.clock .tick { stroke: var(--muted); stroke-width: 1; stroke-linecap: round; opacity: .55; }
.clock .tick.major { stroke: var(--ink); stroke-width: 2.4; opacity: 1; }
.clock .hand { stroke: var(--ink); stroke-linecap: round; }
.clock .sec line { stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; }
.clock .sec circle { fill: var(--accent); }
.clock .pin { fill: var(--bg); }
.clock figcaption {
  margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}

/* Sections */
section { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: clamp(20px, 4vw, 48px);
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.label {
  font-size: 14px; color: var(--muted); margin: 0;
  font-variant-numeric: tabular-nums;
}
.label b { color: var(--accent); font-weight: 400; margin-right: 10px; }
h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 24px; max-width: 20ch;
}
h2 em { font-style: italic; }
.prose p { margin: 0 0 1em; max-width: 58ch; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 500; }

/* App list */
.apps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.apps li { border-bottom: 1px solid var(--line); }
.apps a {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 9rem) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px 20px;
  padding: 20px 12px 20px 0;
  text-decoration: none;
  transition: background-color .25s, padding .25s;
}
.apps a:hover { background: var(--hover); padding-left: 12px; }
.apps .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.apps .name { font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.01em; }
.apps .what { color: var(--muted); line-height: 1.45; }
.apps .what small { display: block; font-size: 13px; margin-top: 4px; opacity: .85; }
.apps .go {
  font-size: 14px; color: var(--muted); white-space: nowrap;
  transition: color .2s, transform .25s;
}
.apps a:hover .go { color: var(--accent); transform: translate(2px, -2px); }

/* Tennnis card */
.card {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-decoration: none;
  transition: border-color .25s, background-color .25s;
}
.card:hover { border-color: var(--ink); background: var(--hover); }
.card h2 { margin-bottom: 12px; }
.card p { margin: 0; color: var(--muted); max-width: 46ch; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 500; white-space: nowrap;
}
.card:hover .button { background: var(--accent); color: #fff; }

/* Contact */
.contact-mail {
  font-family: var(--serif);
  font-size: clamp(2rem, 5.4vw, 4.2rem);
  line-height: 1; letter-spacing: -0.02em;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .35s ease;
  overflow-wrap: anywhere;
}
.contact-mail:hover { background-size: 100% 2px; }
.details {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; margin: 48px 0 0; padding: 0;
}
.details div { border-top: 1px solid var(--line); padding-top: 14px; }
.details dt { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.details dd { margin: 0; line-height: 1.5; font-variant-numeric: tabular-nums; }

/* Footer */
footer { border-top: 1px solid var(--line); }
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 12px 32px; padding-top: 28px; padding-bottom: 36px;
  font-size: 14px; color: var(--muted);
}
.foot strong { color: var(--ink); font-weight: 500; }
.foot a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); text-decoration-color: currentColor; }
.orgnr { font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .clock { max-width: 280px; justify-self: start; }
  .row { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .top nav > a { display: none; }
  .apps a {
    grid-template-columns: 1.8rem minmax(0, 1fr) auto;
    padding-right: 4px;
  }
  .apps .what { grid-column: 2 / -1; }
  .apps .go { grid-column: 3; grid-row: 1; }
  .apps a:hover { padding-left: 8px; }
  .clock { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* EN / NO switch */
.top nav { align-items: center; }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  padding-left: 20px; border-left: 1px solid var(--line);
  font-size: 13px; letter-spacing: 0.06em; color: var(--muted);
}
.top nav .lang a { padding: 10px 2px; }
.top nav .lang a[aria-current] {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
@media (max-width: 620px) {
  .lang { padding-left: 0; border-left: 0; }
}
