/* tunca.co.uk — Tunca Ltd
   Brand blue #47BBEC measures 2.10:1 on paper, so it is a ground, fill and
   rule colour only. Text that must read as brand uses --brand-ink (5.26:1). */

:root {
  --ink:        #16181A;
  --muted:      #6B7280;
  --paper:      #FAFAF8;
  --surface:    #FFFFFF;
  --line:       #E5E5E0;
  --brand:      #47BBEC;
  --brand-ink:  #0B6FA3;
  --brand-wash: #EAF7FD;

  /* Text ON the brand ground. White is 2.2:1 there and fails AA; these are
     8.1:1 and 5.5:1. Deliberately NOT redefined for dark mode — the blue
     ground is identical in both themes, so the text on it must be too. */
  --on-brand:       #16181A;
  --on-brand-muted: #1B3A48;

  --radius: 14px;
  --maxw: 1100px;
  --shadow: 0 1px 2px rgba(22, 24, 26, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #ECEEF0;
    --muted:      #9AA3AB;
    --paper:      #0E1113;
    --surface:    #16191C;
    --line:       #262A2E;
    --brand-ink:  #47BBEC;
    --brand-wash: #12262F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Anchor targets must clear the sticky header, or the heading you land on
   sits underneath it. Header is 64px. */
#work, #about, #contact, #main { scroll-margin-top: 84px; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.site-header img { height: 22px; width: auto; }
.nav { display: flex; gap: 24px; }
.nav a {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover { color: var(--ink); }

/* Inverted header — sits directly on the hero's brand ground. */
.site-header.invert {
  background: var(--brand);
  border-bottom: none;
  backdrop-filter: none;
}
.site-header.invert .nav a { color: var(--on-brand-muted); }
.site-header.invert .nav a:hover { color: var(--on-brand); }

/* Hero */
.hero { padding: 96px 0 72px; }

.hero-brand {
  background: var(--brand);
  padding: 72px 0 104px;
  position: relative;
  overflow: hidden;
}
/* Soft shapes that give the empty right-hand side some weight without
   inventing content. Purely decorative, so they sit behind everything. */
.hero-brand::before,
.hero-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  pointer-events: none;
}
.hero-brand::before { right: -130px; top: -180px; width: 540px; height: 540px; }
.hero-brand::after { right: 190px; bottom: -230px; width: 320px; height: 320px; background: rgba(255,255,255,.09); }
.hero-brand .wrap { position: relative; z-index: 1; }
.hero-brand .eyebrow { color: var(--on-brand-muted); }
.hero-brand h1 {
  color: var(--on-brand);
  font-size: clamp(2.8rem, 7.5vw, 5.25rem);
  margin-bottom: 26px;
}
.hero-brand .lead {
  color: var(--on-brand-muted);
  max-width: 52ch;
  font-size: 20px;
}

/* Product marks as a credential strip. Sources differ wildly in aspect ratio,
   so they are normalised by height and capped by width, with wide banner marks
   optically reduced so they do not out-weigh the round ones. */
.hero-marks {
  display: flex;
  gap: 14px;
  margin: 52px 0 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.hero-marks li { display: flex; }
.hero-marks a {
  background: var(--surface);
  border-radius: 14px;
  width: 116px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 6px 20px rgba(22, 24, 26, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hero-marks a:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(22, 24, 26, .20);
}
.hero-marks a:active { transform: translateY(-1px); }
.hero-marks a:focus-visible { outline: 2px solid var(--on-brand); outline-offset: 3px; }
.hero-marks img { height: 30px; width: auto; max-width: 88px; object-fit: contain; }
.hero-marks img.wide { height: 24px; max-width: 94px; }
.eyebrow {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 24px;
}
.lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 19px;
}

/* Sections */
.section { padding: 72px 0; }
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 32px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--brand);
  vertical-align: middle;
  margin-right: 10px;
}

.cols {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, 1fr);
}
.col h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.col p { color: var(--muted); font-size: 15px; }

/* Work */
.work-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.card-logo { height: 40px; width: auto; margin-bottom: 20px; }
.card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--brand-wash);
  color: var(--brand-ink);
  padding: 5px 10px;
  border-radius: 999px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-go { color: var(--brand-ink); font-size: 15px; }

/* About */
.about { background: var(--brand-wash); }
.about .body { max-width: 60ch; }
.about p + p { margin-top: 18px; }

/* Long-form pages */
.prose { max-width: 68ch; }
.prose h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.prose h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}
.prose p { margin-bottom: 16px; }
.prose .lead { color: var(--muted); font-size: 15px; margin-bottom: 40px; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--brand-wash);
  color: var(--brand-ink);
  padding: 2px 6px;
  border-radius: 6px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.center { margin-inline: auto; }

/* Contact */
.contact { text-align: center; padding: 96px 0; }
.mail-link {
  display: inline-block;
  margin-top: 16px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
  text-underline-offset: 6px;
}

/* Footer */
.site-footer {
  background: var(--brand);
  color: var(--on-brand);
  padding: 56px 0;
}
.site-footer img { height: 20px; width: auto; margin-bottom: 24px; }
.site-footer a { color: var(--on-brand); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.legal {
  font-size: 13px;
  color: var(--on-brand-muted);
  max-width: 62ch;
}

/* Reveal — the base state is the FINAL state. Only .js-hidden deviates, and
   main.js applies it solely to elements that start below the fold. Content is
   therefore visible whether JavaScript never runs, runs late, or fails. */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.js-hidden { opacity: 0; transform: translateY(12px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Consent */
.consent {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 18px 0;
  z-index: 50;
  box-shadow: 0 -4px 24px rgba(22, 24, 26, .08);
}
.consent-inner {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.consent-inner p { margin: 0; font-size: 14px; color: var(--muted); }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Accept and Decline are deliberately identical in size and weight. */
.btn, .btn-quiet {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn { background: var(--brand-ink); color: #fff; }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink); }

@media (max-width: 760px) {
  .cols, .work-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
}

@media (max-width: 640px) {
  .consent-inner { flex-direction: column; align-items: flex-start; }
  .nav { gap: 16px; }
  .site-header .wrap { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.js-hidden { transition: none; transform: none; opacity: 1 !important; }
  .card, .hero-marks a { transition: none; }
  .card:hover, .hero-marks a:hover, .hero-marks a:active { transform: none; }
}
