:root {
  --ink: #f3f0e7;
  --muted: #a7a49c;
  --faint: #78766e;
  --paper: #11110f;
  --surface: #1a1a17;
  --line: rgba(243, 240, 231, 0.15);
  --lime: #d9f56a;
  --violet: #9d8df2;
  --orange: #f1a46d;
  --mono: "DM Mono", monospace;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --title-size: clamp(46px, 4.8vw, 68px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.site-shell { overflow: hidden; }
.section-wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }

.site-header { width: min(1180px, calc(100% - 64px)); margin: 0 auto; height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.wordmark { width: 150px; height: 54px; display: block; overflow: hidden; }
.wordmark img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; mix-blend-mode: screen; }
.wordmark-dot, .ui-logo span, .mark-dot { color: var(--lime); }
.site-nav { display: flex; align-items: center; gap: 36px; font-size: 13px; color: var(--muted); }
.site-nav a, .text-link, .footer a { transition: color 180ms ease; }
.site-nav a:hover, .text-link:hover, .site-footer a:hover { color: var(--lime); }
.nav-contact { color: var(--ink) !important; border-bottom: 1px solid var(--lime); padding-bottom: 4px; }
.nav-contact span, .text-link span { color: var(--lime); margin-left: 8px; }
.menu-toggle { display: none; background: none; color: var(--ink); border: 0; padding: 10px 0; cursor: pointer; }

.hero { min-height: 660px; margin-bottom: 45px; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(360px, .97fr); align-items: center; gap: 8%; }
.eyebrow { color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 26px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-right: 10px; box-shadow: 0 0 0 4px rgba(217,245,106,.08); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); }
h1, h2 { font-weight: 700; letter-spacing: -.065em; line-height: .98; }
h1 { max-width: 700px; font-size: var(--title-size); margin-bottom: 28px; }
h1 em, h2 em { color: var(--lime); font-style: normal; }
.hero-copy h1 em { color: var(--lime); }
.hero-lede { max-width: 455px; color: var(--muted); font-size: 17px; line-height: 1.65; margin-bottom: 28px; }
.button { display: inline-flex; align-items: center; gap: 21px; padding: 15px 19px; border-radius: 14px; font-size: 12px; font-weight: 700; transition: transform 180ms ease, background 180ms ease; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--lime); color: #171711; }
.button-primary span { font-size: 17px; line-height: 0; }
.hero-graphic { height: 420px; position: relative; display: grid; place-items: center; isolation: isolate; }
.hero-frame { width: min(100%, 465px); height: 362px; padding: 0 20px 18px; display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; position: relative; border: 1px solid rgba(243,240,231,.22); border-radius: 24px; background: linear-gradient(145deg, #1c1e1d, #131413 72%); box-shadow: 18px 20px 0 rgba(157,141,242,.18); }
.frame-chrome { height: 49px; flex: 0 0 49px; margin: 0 -20px 18px; padding: 0 20px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid rgba(243,240,231,.12); background: rgba(8,9,9,.14); }
.frame-chrome > span { width: 8px; height: 8px; border-radius: 50%; background: #ff625c; }
.frame-chrome > span:nth-child(2) { background: #ffbd44; }
.frame-chrome > span:nth-child(3) { background: #35c759; }
.frame-core { position: relative; z-index: 1; flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; padding: 28px 20px; overflow: hidden; }
.code-snippet { display: grid; grid-template-columns: 1fr; gap: 7px; color: var(--ink); font: 500 clamp(13px, 1.5vw, 17px)/1.45 var(--mono); letter-spacing: -.04em; white-space: nowrap; }
.code-snippet i { color: var(--violet); font-style: normal; }
.code-snippet b { color: var(--orange); font-weight: 500; }
.code-snippet em { color: var(--lime); font-style: normal; }
.core-line { width: 90%; height: 1px; margin-top: 31px; background: linear-gradient(90deg, var(--lime), transparent); }

.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 17px 0; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.ticker-track { display: flex; width: max-content; align-items: stretch; transform: translate3d(0, 0, 0); will-change: transform; animation: drift 40s linear infinite; }
.ticker-group { --ticker-gap: max(48px, calc((100vw - 360px) / 6 + 12px)); display: flex; flex: 0 0 auto; align-items: center; gap: var(--ticker-gap); padding-right: var(--ticker-gap); white-space: nowrap; }
.ticker-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); }
.ticker-group > span:not(.ticker-dot) { flex: 0 0 auto; text-align: center; }
@keyframes drift { to { transform: translate3d(-20%, 0, 0); } }
.work, .about, .contact { padding-top: 165px; }
.section-heading h2 { font-size: var(--title-size); margin-bottom: 28px; }
.contact h2 { font-size: var(--title-size); margin-bottom: 62px; }
#arbeid { scroll-margin-top: 40px; }
#om, #kontakt { scroll-margin-top: 80px; }
.project-card { display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.project-visual { height: 560px; min-height: 560px; position: relative; overflow: hidden; background: #26272a; background-image: radial-gradient(circle at 35% 35%, rgba(157,141,242,.26), transparent 31%), radial-gradient(circle at 80% 80%, rgba(217,245,106,.12), transparent 28%); }
.project-chrome { height: 44px; border-bottom: 1px solid rgba(243,240,231,.13); display: flex; gap: 6px; align-items: center; padding: 0 18px; color: var(--faint); }
.project-chrome > span { width: 6px; height: 6px; border-radius: 50%; background: #6f716e; }
.iphone-clip { position: absolute; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.iphone-preview { position: absolute; top: 58px; left: 50%; width: min(320px, calc(100% - 24px)); aspect-ratio: 1470 / 3000; overflow: hidden; filter: drop-shadow(22px 26px 0 rgba(11,11,10,.28)); transform: translateX(-50%) rotate(-4deg); }
.iphone-preview > img:first-child { position: absolute; z-index: 1; top: 1.5%; left: 2.7%; width: 94.6%; height: 97%; border-radius: 11%; object-fit: cover; object-position: center top; }
.iphone-frame { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.project-info { min-height: 515px; padding: 52px 47px 42px; display: flex; flex-direction: column; justify-content: center; }
.project-kicker { color: var(--faint); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 22px; }
.project-info h3 { color: var(--lime); font-size: 45px; letter-spacing: -.07em; margin-bottom: 18px; }
.project-info h3.project-brand { width: min(100%, 240px); aspect-ratio: 1813 / 548; margin-bottom: 18px; line-height: 0; overflow: hidden; }
.project-info h3.project-brand img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.project-info p:not(.project-kicker) { max-width: 390px; color: var(--muted); line-height: 1.65; }
.text-link { width: max-content; border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: 12px; font-weight: 700; }
.project-link { display: inline-block; margin-top: 18px; color: var(--ink); }

.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; align-items: start; clear: both; }
.about-mark { min-height: 280px; display: flex; align-items: flex-start; }
.about-mark h2 { max-width: 535px; font-size: var(--title-size); margin-bottom: 0; }
.about-copy { max-width: 535px; padding-top: 0; }
.about-copy p + p { margin-top: 26px; }
.about-copy > p:not(.eyebrow) { color: var(--muted); max-width: none; line-height: 1.7; }
.about-copy .text-link { margin-top: 18px; }

.contact { margin-top: 165px; border-top: 1px solid var(--line); padding-block: 120px 140px; display: flex; align-items: center; justify-content: center; }
.contact-link { display: inline-block; margin-inline: auto; text-align: center; color: var(--lime); font-size: clamp(19px, 2.5vw, 30px); font-weight: 700; letter-spacing: -.06em; border-bottom: 1px solid var(--lime); padding-bottom: 8px; }
.site-footer { min-height: 90px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; color: var(--faint); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.site-footer > span:first-child { justify-self: start; }
.site-footer > span:nth-child(2) { justify-self: center; }
.site-footer > a { justify-self: end; }
.copyright-mark { display: inline-block; font-size: 13px; line-height: 1; vertical-align: -1px; }
.footer-brand { display: block; width: 28px; height: 28px; opacity: .58; }
.footer-brand img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.site-footer a:hover { color: var(--lime); }

@media (max-width: 800px) {
  .section-wrap, .site-header { width: min(100% - 40px, 620px); }
  .site-header { height: 76px; }
  .menu-toggle { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
  .menu-icon { display: grid; gap: 4px; }
  .menu-icon i { display: block; width: 16px; height: 1px; background: var(--lime); }
  .site-nav { position: absolute; left: 0; right: 0; top: 75px; padding: 0; max-height: 0; overflow: hidden; display: grid; gap: 0; background: var(--paper); transition: max-height 220ms ease, padding 220ms ease; }
  .site-nav.is-open { max-height: 210px; padding: 10px 0 20px; border-bottom: 1px solid var(--line); }
  .site-nav a { padding: 12px 0; }
  .hero { min-height: 0; margin-bottom: 0; display: block; padding-top: 60px; }
  h1 { font-size: clamp(48px, 13vw, 76px); }
  .hero-graphic { height: 320px; margin: 60px 0 80px; }
  .hero-frame { height: 315px; }
  .work, .about { padding-top: 60px; }
  .section-heading h2, .about-mark h2, .contact h2 { font-size: clamp(42px, 11vw, 68px); margin-bottom: 28px; }
  .project-card { grid-template-columns: 1fr; }
  .project-visual { height: 515px; min-height: 515px; }
  .project-info { min-height: 430px; }
  .project-info { padding: 35px 28px 32px; }
  .project-info h3.project-brand { width: min(100%, 200px); }
  .iphone-preview { width: 292px; }
  .about { grid-template-columns: 1fr; gap: 0; }
  .about-mark { min-height: 0; margin-bottom: 0; }
  .about-copy { padding-top: 0; }
  .contact { margin-top: 60px; padding-block: 90px 100px; }
  .site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); min-height: 115px; gap: 0; padding: 24px 0; }
}

@media (max-width: 520px) {
  .hero-frame { width: calc(100% - 18px); max-width: none; justify-self: start; }
  .project-visual { overflow: visible; z-index: 3; }
  .project-info { position: relative; z-index: 1; }
  .iphone-preview { width: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
