/* Jurassic Interactive: main styles */
:root {
  /* Layout idea: a calm white page with generous space, one harbour-blue accent, and live demos framed like real websites. */
  --bg: #ffffff;
  --bg-alt: #f2f4f5;
  --ink: #0f1419;
  --muted: #56616b;
  --line: #e1e5e8;
  --accent: #0d5a74;
  --accent-dark: #094457;
  --gold: #d8992b;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --wrap: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.4rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.kicker { font-size: 0.9rem; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.lede { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); color: var(--muted); max-width: 38ch; margin-top: 22px; }
.lede-sm { font-size: 1.15rem; color: var(--muted); max-width: 52ch; margin: 18px 0 0; }
.lede-sm + p { margin-top: 16px; max-width: 58ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--body); padding: 15px 24px; border-radius: 10px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.btn-sm { padding: 11px 16px; font-size: 0.93rem; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a323a; color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--bg-alt); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.main-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.main-nav a:hover { color: var(--ink); }
.brand, .head-row .btn { white-space: nowrap; }
@media (max-width: 860px) { .main-nav { display: none; } }
@media (max-width: 420px) { .brand { font-size: 1rem; } .brand svg { width: 24px; height: 24px; } .head-row .btn { padding: 9px 12px; font-size: 0.85rem; } }

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.note { margin-top: 22px; font-size: 0.93rem; color: var(--muted); }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

/* Browser frame + gallery */
.browser { margin: 0; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15, 20, 25, 0.04), 0 24px 48px -20px rgba(15, 20, 25, 0.22); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 11px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #d3d8dc; }
.url { flex: 1; font-size: 0.8rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; max-width: 280px; }
.gallery { padding: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { font: 500 0.88rem/1 var(--body); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.thumbs li { transition: opacity .25s ease, transform .25s ease; }
.thumbs li.is-hidden { display: none; }
.thumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; font: inherit; }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; transition: transform .25s ease, box-shadow .25s ease; }
.thumb:hover img { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(15, 20, 25, 0.4); }
.thumb span { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 5px; line-height: 1.3; }
@media (max-width: 520px) { .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1000px, 94vw); width: 100%; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 14, 18, 0.86); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; border-radius: 10px; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 12px; font-size: 1rem; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; border-radius: 50%; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; display: grid; place-items: center; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lb-close { top: -56px; right: 0; }
.lb-nav { top: calc(50% - 40px); }
.lb-prev { left: -60px; }
.lb-next { right: -60px; }
@media (max-width: 1120px) { .lb-prev { left: 8px; } .lb-next { right: 8px; } }

/* Sections */
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--ink); color: #e9edf0; }
.section.dark h2 { color: #fff; }
.section.dark .kicker { color: #7fc3d8; }
.section.dark .lede-sm { color: #b9c2c9; }
.section > .wrap > h2 { max-width: 20ch; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* Services */
.services { padding-top: 0; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.service { padding: 36px 32px 8px 0; display: grid; gap: 12px; align-content: start; }
.service + .service { padding-left: 32px; border-left: 1px solid var(--line); }
.service svg { width: 38px; height: 38px; color: var(--accent); margin-bottom: 6px; }
.service p { color: var(--muted); }
.more { font-weight: 600; text-decoration: none; }
.more::after { content: " \2192"; }
@media (max-width: 860px) {
  .service-grid { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0; border-left: 0; }
  .service + .service { border-top: 1px solid var(--line); }
}

/* Tick list */
.ticks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* Before and after */
.compare { margin: 0; }
.compare-frame { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 24px 48px -24px rgba(15, 20, 25, 0.35); --pos: 50%; }
.compare-frame > img, .compare-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-before img { filter: grayscale(1) sepia(0.35) contrast(0.85) brightness(0.85) blur(0.6px); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.compare-handle::after { content: "\2039\00a0\203A"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare input[type="range"]:focus-visible + .compare-handle, .compare-frame:focus-within .compare-handle::after { outline: 3px solid var(--accent); }
.tag { position: absolute; top: 14px; font-size: 0.8rem; font-weight: 600; background: rgba(15, 20, 25, 0.7); color: #fff; padding: 5px 10px; border-radius: 6px; pointer-events: none; }
.tag-l { left: 14px; }
.tag-r { right: 14px; }
.compare figcaption, .adv-pic figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }

/* Game */
.game { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 24px 48px -28px rgba(15, 20, 25, 0.25); }
.game-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.game-title { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.game-count { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.game-bar { height: 6px; background: var(--bg-alt); border-radius: 999px; margin: 14px 0 24px; overflow: hidden; }
.game-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .35s ease; }
.game-q { font-size: 1.3rem; line-height: 1.45; min-height: 3.2em; }
.game-q .gap { display: inline-block; min-width: 3.6em; border-bottom: 2.5px solid var(--ink); text-align: center; font-weight: 700; color: var(--accent); }
.game-q .gap.right { color: #1d7a45; border-color: #1d7a45; }
.game-q .gap.wrong { color: #b3261e; border-color: #b3261e; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.opt { font: 600 1.05rem/1 var(--body); padding: 16px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt:disabled { cursor: default; }
.opt.right { background: #e7f4ec; border-color: #1d7a45; color: #13532f; }
.opt.wrong { background: #fbeaea; border-color: #b3261e; color: #7d1a15; }
.explain { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--bg-alt); font-size: 0.98rem; }
.explain b { display: block; margin-bottom: 2px; }
.game-next { margin-top: 18px; width: 100%; }
.result { text-align: center; }
.result .score { font: 800 3.2rem/1 var(--display); color: var(--accent); margin: 6px 0 6px; }
.result ul { text-align: left; margin: 18px 0 20px; padding: 0; list-style: none; display: grid; gap: 6px; }
.result li { padding: 8px 12px; background: var(--bg-alt); border-radius: 8px; }
.result li b { color: var(--accent); }

/* Adventures teaser */
.split-media { grid-template-columns: 1fr 1fr; }
.adv-pic { margin: 0; }
.adv-pic img { border-radius: var(--radius); }
.mini-steps { margin: 26px 0 30px; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
.mini-steps li { counter-increment: s; position: relative; padding-left: 34px; color: #b9c2c9; }
.mini-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; font-family: var(--display); font-weight: 700; color: var(--gold); }
.mini-steps b { color: #fff; font-weight: 600; }

/* Process */
.process { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.process li { border-top: 2px solid var(--ink); padding-top: 18px; display: grid; gap: 10px; align-content: start; }
.process span { font-family: var(--display); font-weight: 700; color: var(--accent); }
.process p { color: var(--muted); font-size: 1rem; }
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } }

/* About facts */
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: #fff; padding: 24px; }
.facts dt { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.facts dd { margin: 4px 0 0; color: var(--muted); font-size: 0.97rem; }

/* Contact form */
#contact .split { align-items: start; }
.contact-line { margin-top: 22px; }
.form { display: grid; gap: 16px; background: var(--bg-alt); padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.93rem; }
.field input, .field select, .field textarea { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(13, 90, 116, 0.18); }
.form .btn { justify-self: start; }
.form-msg { padding: 12px 14px; border-radius: 10px; font-size: 0.97rem; background: #fff; }
.form-msg.ok { background: #e7f4ec; color: #13532f; }
.form-msg.bad { background: #fbeaea; color: #7d1a15; }
.hp { position: absolute; left: -9999px; }

/* Plain pages */
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 24px; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.prose p { margin: 0 0 1em; }

/* Footer */
.site-foot { background: var(--ink); color: #b9c2c9; padding: 48px 0; font-size: 0.95rem; }
.foot-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-brand { font-family: var(--display); font-weight: 700; color: #fff; font-size: 1.1rem; margin-bottom: 6px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: #e9edf0; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .small { font-size: 0.85rem; margin-top: 6px; }
@media (max-width: 760px) { .foot-row { grid-template-columns: 1fr; } }

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

/* Content example: before and after copy */
.copy-demo { margin: 0; display: grid; gap: 14px; }
.copy-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 20px; }
.copy-before p { color: var(--muted); font-size: 0.98rem; }
.copy-after { border-color: var(--accent); box-shadow: 0 24px 48px -28px rgba(13, 90, 116, 0.45); }
.copy-label { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; background: var(--bg-alt); color: var(--muted); }
.copy-after .copy-label { background: var(--accent); color: #fff; }
.copy-head { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 6px; line-height: 1.2; }
.copy-demo figcaption { font-size: 0.9rem; color: var(--muted); }
.section.dark .game { color: var(--ink); }
