/* ============================================================
   Kolasa Bygg Service AS — design system
   Navy + safety yellow. Display: Clash Display. Body: Satoshi.
   ============================================================ */

:root, [data-theme='light'] {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing */
  --space-1:.25rem; --space-2:.5rem; --space-3:.75rem; --space-4:1rem;
  --space-5:1.25rem; --space-6:1.5rem; --space-8:2rem; --space-10:2.5rem;
  --space-12:3rem; --space-16:4rem; --space-20:5rem; --space-24:6rem; --space-32:8rem;

  /* Fonts */
  --font-display: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;

  /* Surfaces */
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-surface-2: #f0f2f5;
  --color-surface-alt: #eef1f5;
  --color-border: #d9dee6;
  --color-divider: #e4e8ee;

  /* Text */
  --color-text: #131c2b;
  --color-text-muted: #56627a;
  --color-text-faint: #97a1b3;
  --color-text-inverse: #f5f7fa;

  /* Brand — deep navy */
  --color-navy: #152238;
  --color-navy-2: #1c2c47;
  --color-navy-3: #24385a;

  /* Accent — safety yellow */
  --color-primary: #f2b705;        /* used for accents/buttons context */
  --color-accent: #ffc21a;
  --color-accent-hover: #ffb300;
  --color-accent-ink: #16213a;     /* text on yellow */

  /* Primary CTA derived */
  --cta-bg: #ffc21a;
  --cta-bg-hover: #ffb300;
  --cta-ink: #16213a;

  /* Logo */
  --logo-bg: #152238;
  --logo-accent: #ffc21a;
  --logo-line: #ffffff;

  --radius-sm:.4rem; --radius-md:.6rem; --radius-lg:.9rem; --radius-xl:1.25rem; --radius-full:9999px;
  --transition-interactive: 200ms cubic-bezier(0.16,1,0.3,1);
  --shadow-sm: 0 1px 2px rgba(21,34,56,.08);
  --shadow-md: 0 8px 24px rgba(21,34,56,.10);
  --shadow-lg: 0 20px 48px rgba(21,34,56,.16);
  --content-wide: 1200px;
}

[data-theme='dark'] {
  --color-bg: #0d141f;
  --color-surface: #131d2c;
  --color-surface-2: #18243a;
  --color-surface-alt: #111a28;
  --color-border: #283750;
  --color-divider: #1e2c42;
  --color-text: #e7ecf3;
  --color-text-muted: #97a4ba;
  --color-text-faint: #62718a;
  --color-text-inverse: #0d141f;
  --color-navy: #0a111c;
  --color-navy-2: #101b2c;
  --color-navy-3: #18253b;
  --color-accent: #ffc21a;
  --color-accent-hover: #ffce4a;
  --logo-bg: #1c2c47;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:#0d141f; --color-surface:#131d2c; --color-surface-2:#18243a;
    --color-surface-alt:#111a28; --color-border:#283750; --color-divider:#1e2c42;
    --color-text:#e7ecf3; --color-text-muted:#97a4ba; --color-text-faint:#62718a;
    --color-text-inverse:#0d141f; --color-navy:#0a111c; --color-navy-2:#101b2c;
    --color-navy-3:#18253b; --logo-bg:#1c2c47;
  }
}

/* ---------- Layout primitives ---------- */
.container { width:100%; max-width:var(--content-wide); margin-inline:auto; padding-inline:var(--space-6); }
.section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); }
.section--tight { padding-block: clamp(var(--space-12), 7vw, var(--space-24)); }
.section--alt { background: var(--color-surface-alt); }
.eyebrow {
  display:inline-block; font-family:var(--font-body); font-weight:700;
  font-size:var(--text-xs); letter-spacing:.14em; text-transform:uppercase;
  color: var(--color-text-muted); margin-bottom: var(--space-4);
}
.eyebrow::before { content:""; display:inline-block; width:26px; height:2px; background:var(--color-accent); vertical-align:middle; margin-right:var(--space-3); }
.eyebrow--light { color: rgba(255,255,255,.85); }
.eyebrow--light::before { background: var(--color-accent); }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing:-0.01em; color: var(--color-text); }
.section__head { max-width: 58ch; margin-bottom: var(--space-12); }
.section__head h2 { font-size: var(--text-xl); }
.section__intro { color: var(--color-text-muted); font-size: var(--text-base); margin-top: var(--space-4); }

.skip-link { position:absolute; left:-999px; top:0; background:var(--color-accent); color:var(--cta-ink); padding:var(--space-3) var(--space-4); z-index:200; border-radius:0 0 var(--radius-md) 0; }
.skip-link:focus { left:0; }

/* ---------- Buttons ---------- */
.btn {
  --b:transparent;
  display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2);
  font-family:var(--font-body); font-weight:700; font-size:var(--text-sm);
  padding: .7rem 1.25rem; border-radius: var(--radius-md); text-decoration:none;
  border:1.5px solid var(--b); line-height:1; white-space:nowrap;
}
.btn--lg { padding:.95rem 1.6rem; font-size:var(--text-base); }
.btn--block { width:100%; }
.btn--primary { background:var(--cta-bg); color:var(--cta-ink); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background:var(--cta-bg-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background:transparent; color:#fff; --b: rgba(255,255,255,.5); }
.btn--ghost:hover { background:rgba(255,255,255,.12); --b:#fff; transform:translateY(-2px); }

/* ---------- Header ---------- */
.header {
  position: sticky; top:0; z-index:100;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(12px);
  border-bottom:1px solid transparent;
  transition: box-shadow .3s, border-color .3s, background .3s;
}
.header--scrolled { box-shadow: var(--shadow-sm); border-color: var(--color-divider); }
.header__inner { display:flex; align-items:center; justify-content:space-between; gap:var(--space-6); padding-block:var(--space-3); }
.brand { display:flex; align-items:center; gap:var(--space-3); text-decoration:none; color:var(--color-text); }
.brand__text { display:flex; flex-direction:column; line-height:1; }
.brand__name { font-family:var(--font-display); font-weight:700; font-size:1.15rem; letter-spacing:.02em; }
.brand__sub { font-size:.72rem; color:var(--color-text-muted); letter-spacing:.08em; text-transform:uppercase; margin-top:3px; }
.nav { display:flex; gap:var(--space-6); }
.nav a { text-decoration:none; color:var(--color-text-muted); font-size:var(--text-sm); font-weight:500; position:relative; }
.nav a:hover { color:var(--color-text); }
.nav a::after { content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0; background:var(--color-accent); transition:width var(--transition-interactive); }
.nav a:hover::after { width:100%; }
.header__actions { display:flex; align-items:center; gap:var(--space-3); }
.icon-btn { width:42px; height:42px; display:grid; place-items:center; border-radius:var(--radius-md); color:var(--color-text); border:1px solid var(--color-border); }
.icon-btn:hover { background:var(--color-surface-2); }
.nav-toggle { display:none; }

.mobile-nav { display:none; flex-direction:column; gap:var(--space-1); padding:var(--space-4) var(--space-6) var(--space-6); background:var(--color-surface); border-bottom:1px solid var(--color-divider); }
.mobile-nav a { text-decoration:none; color:var(--color-text); padding:var(--space-3) 0; font-weight:500; border-bottom:1px solid var(--color-divider); }
.mobile-nav .btn { margin-top:var(--space-3); }

/* ---------- Hero ---------- */
.hero { position:relative; min-height: clamp(560px, 82vh, 760px); display:flex; align-items:flex-end; color:#fff; overflow:hidden; }
.hero__media { position:absolute; inset:0; z-index:0; }
.hero__media img { width:100%; height:100%; object-fit:cover; }
.hero__scrim { position:absolute; inset:0; background:
  linear-gradient(180deg, rgba(13,17,28,.35) 0%, rgba(13,17,28,.15) 35%, rgba(13,17,28,.78) 100%),
  linear-gradient(90deg, rgba(21,34,56,.65) 0%, rgba(21,34,56,0) 60%); }
.hero__content { position:relative; z-index:1; padding-block: clamp(var(--space-16), 9vw, var(--space-24)); max-width: 760px; }
.hero h1 { font-family:var(--font-display); font-weight:600; font-size:var(--text-2xl); color:#fff; line-height:1.06; }
.hero__lead { font-size:var(--text-base); color:rgba(255,255,255,.9); margin-top:var(--space-5); max-width:56ch; }
.hero__cta { display:flex; flex-wrap:wrap; gap:var(--space-3); margin-top:var(--space-8); }
.hero__trust { display:flex; flex-wrap:wrap; gap:var(--space-5); margin-top:var(--space-8); font-size:var(--text-sm); color:rgba(255,255,255,.92); }
.hero__trust li { display:flex; align-items:center; gap:var(--space-2); }
.hero__trust svg { color:var(--color-accent); flex-shrink:0; }

/* ---------- Stats ---------- */
.stats { background:var(--color-navy); color:#fff; }
.stats__grid { display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-6); padding-block:var(--space-10); }
.stat { display:flex; flex-direction:column; gap:var(--space-1); border-left:3px solid var(--color-accent); padding-left:var(--space-4); }
.stat__num { font-family:var(--font-display); font-weight:700; font-size:var(--text-xl); color:#fff; }
.stat__label { font-size:var(--text-sm); color:rgba(255,255,255,.7); }

/* ---------- Cards ---------- */
.cards { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-6); }
.card {
  background:var(--color-surface); border:1px solid var(--color-divider); border-radius:var(--radius-lg);
  padding:var(--space-8); display:flex; flex-direction:column; gap:var(--space-3); position:relative; overflow:hidden;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}
.card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--color-border); }
.card--feature { background: var(--color-navy); border-color:var(--color-navy-3); color:#fff; }
.card--feature h3 { color:#fff; }
.card--feature p { color:rgba(255,255,255,.78); }
.card--feature::after { content:""; position:absolute; right:-30px; top:-30px; width:120px; height:120px; background:radial-gradient(circle, rgba(255,194,26,.18), transparent 70%); }
.card__icon { width:56px; height:56px; border-radius:var(--radius-md); display:grid; place-items:center; background:rgba(255,194,26,.14); color:var(--color-accent-hover); margin-bottom:var(--space-2); }
.card--feature .card__icon { background:rgba(255,194,26,.18); color:var(--color-accent); }
.card h3 { font-size:var(--text-lg); }
.card p { color:var(--color-text-muted); font-size:var(--text-sm); }
.card__tag { align-self:flex-start; font-size:var(--text-xs); font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--cta-ink); background:var(--color-accent); padding:.25rem .6rem; border-radius:var(--radius-full); position:relative; z-index:1; }

/* ---------- Split sections ---------- */
.split__grid { display:grid; grid-template-columns:1fr 1fr; gap:clamp(var(--space-8),5vw,var(--space-20)); align-items:center; }
.split__media img { width:100%; border-radius:var(--radius-lg); box-shadow:var(--shadow-md); aspect-ratio:4/3; object-fit:cover; }
.split__text h2 { font-size:var(--text-xl); margin-top:var(--space-2); }
.split__text p { color:var(--color-text-muted); margin-top:var(--space-4); }
.split__grid--reverse .split__media { order:2; }
.checklist { display:flex; flex-direction:column; gap:var(--space-2); margin:var(--space-6) 0 var(--space-8); }
.checklist li { display:flex; align-items:center; gap:var(--space-3); font-weight:500; }
.checklist li::before { content:""; width:22px; height:22px; flex-shrink:0; border-radius:var(--radius-full); background:var(--color-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2316213a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.badges { display:flex; flex-wrap:wrap; gap:var(--space-3); margin-top:var(--space-6); }
.badge { display:inline-flex; align-items:center; gap:var(--space-2); font-size:var(--text-xs); font-weight:600; padding:.45rem .8rem; border:1px solid var(--color-border); border-radius:var(--radius-full); color:var(--color-text-muted); }
.badge svg { color:var(--color-accent-hover); }

/* ---------- Why grid ---------- */
.why-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-6); }
.why { background:var(--color-surface); border:1px solid var(--color-divider); border-radius:var(--radius-lg); padding:var(--space-6); }
.why__icon { width:48px; height:48px; border-radius:var(--radius-md); display:grid; place-items:center; background:var(--color-navy); color:var(--color-accent); margin-bottom:var(--space-4); }
.why h3 { font-size:var(--text-lg); margin-bottom:var(--space-2); }
.why p { color:var(--color-text-muted); font-size:var(--text-sm); }

/* ---------- Process ---------- */
.process { display:grid; grid-template-columns:repeat(5,1fr); gap:var(--space-6); counter-reset:step; }
.process__step { position:relative; padding-top:var(--space-8); }
.process__step::before { content:""; position:absolute; top:18px; left:0; right:0; height:2px; background:var(--color-divider); }
.process__step:last-child::before { right:50%; }
.process__step:first-child::before { left:50%; }
.process__num { position:absolute; top:0; left:0; width:38px; height:38px; border-radius:var(--radius-full); display:grid; place-items:center; background:var(--color-accent); color:var(--cta-ink); font-family:var(--font-display); font-weight:700; z-index:1; }
.process__step h3 { font-size:var(--text-base); margin-bottom:var(--space-2); }
.process__step p { color:var(--color-text-muted); font-size:var(--text-sm); }

/* ---------- Full bleed ---------- */
.bleed { position:relative; min-height:clamp(320px,45vh,480px); display:flex; align-items:center; overflow:hidden; }
.bleed img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.bleed__overlay { position:relative; z-index:1; width:100%; background:linear-gradient(90deg, rgba(21,34,56,.85) 0%, rgba(21,34,56,.45) 70%, transparent 100%); padding-block:var(--space-16); }
.bleed__quote { max-width:var(--content-wide); margin-inline:auto; padding-inline:var(--space-6); font-family:var(--font-display); font-weight:500; font-size:var(--text-xl); color:#fff; }

/* ---------- Areas ---------- */
.areas { display:flex; flex-wrap:wrap; gap:var(--space-3); }
.areas li { background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-full); padding:.55rem 1.1rem; font-weight:600; font-size:var(--text-sm); display:flex; align-items:center; gap:var(--space-2); }
.areas li::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--color-accent); }

/* ---------- Contact ---------- */
.contact-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:clamp(var(--space-8),4vw,var(--space-16)); align-items:start; }
.contact-form { background:var(--color-surface); border:1px solid var(--color-divider); border-radius:var(--radius-lg); padding:clamp(var(--space-6),3vw,var(--space-10)); box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:var(--space-5); }
.field { display:flex; flex-direction:column; gap:var(--space-2); }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-5); }
.field label { font-size:var(--text-sm); font-weight:600; }
.field input, .field select, .field textarea { width:100%; padding:.75rem .9rem; border:1.5px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-bg); color:var(--color-text); }
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color:var(--color-accent-hover); box-shadow:0 0 0 3px rgba(255,194,26,.25); }
.field textarea { resize:vertical; }
.form-note { font-size:var(--text-xs); color:var(--color-text-faint); text-align:center; }

.contact-info { background:var(--color-navy); color:#fff; border-radius:var(--radius-lg); padding:clamp(var(--space-6),3vw,var(--space-8)); }
.contact-info h3 { color:#fff; font-size:var(--text-lg); margin-bottom:var(--space-6); }
.contact-list { display:flex; flex-direction:column; gap:var(--space-5); margin-bottom:var(--space-6); }
.contact-list li { display:flex; gap:var(--space-4); align-items:flex-start; }
.contact-list__icon { width:42px; height:42px; flex-shrink:0; border-radius:var(--radius-md); display:grid; place-items:center; background:rgba(255,194,26,.16); color:var(--color-accent); }
.contact-list span span { display:block; }
.contact-list__label { font-size:var(--text-xs); text-transform:uppercase; letter-spacing:.1em; color:rgba(255,255,255,.55); margin-bottom:2px; }
.contact-list a { color:#fff; text-decoration:none; word-break:break-word; }
.contact-list a:hover { color:var(--color-accent); }
.todo { color:var(--color-accent); font-style:normal; font-size:var(--text-xs); }
.map { border-radius:var(--radius-md); overflow:hidden; border:1px solid rgba(255,255,255,.12); margin-bottom:var(--space-3); }
.map iframe { width:100%; height:220px; border:0; display:block; filter:grayscale(.1); }
.map__link { color:var(--color-accent); font-size:var(--text-sm); text-decoration:none; font-weight:600; }
.map__link:hover { text-decoration:underline; }

/* ---------- Footer ---------- */
.footer { background:var(--color-navy); color:rgba(255,255,255,.78); padding-top:var(--space-20); margin-top:0; }
.footer__inner { display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:var(--space-10); padding-bottom:var(--space-16); }
.footer__brand .brand__mark { margin-bottom:var(--space-4); }
.footer__tagline { color:rgba(255,255,255,.7); margin-bottom:var(--space-5); max-width:32ch; }
.footer h4 { color:#fff; font-size:var(--text-base); margin-bottom:var(--space-4); }
.footer ul { display:flex; flex-direction:column; gap:var(--space-2); }
.footer a { color:rgba(255,255,255,.72); text-decoration:none; font-size:var(--text-sm); }
.footer a:hover { color:var(--color-accent); }
.footer li { font-size:var(--text-sm); }
.footer__bar { border-top:1px solid rgba(255,255,255,.12); padding-block:var(--space-6); }
.footer__bar p { font-size:var(--text-xs); color:rgba(255,255,255,.55); }

/* ---------- Reveal animation ---------- */
.reveal { opacity:0; transform:translateY(24px); transition:opacity .7s cubic-bezier(0.16,1,0.3,1), transform .7s cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity:1; transform:none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav, .header__cta { display:none; }
  .nav-toggle { display:grid; }
  .mobile-nav.open { display:flex; }
  .cards, .why-grid { grid-template-columns:repeat(2,1fr); }
  .process { grid-template-columns:repeat(2,1fr); }
  .process__step::before { display:none; }
  .stats__grid { grid-template-columns:repeat(2,1fr); gap:var(--space-8); }
  .split__grid, .contact-grid { grid-template-columns:1fr; }
  .split__grid--reverse .split__media { order:0; }
}
@media (max-width: 600px) {
  .cards, .why-grid, .process, .stats__grid, .field-row { grid-template-columns:1fr; }
  .footer__inner { grid-template-columns:1fr 1fr; gap:var(--space-8); }
  .hero { min-height:auto; }
}
