/* Soudub Creative: darkroom / contact-sheet aesthetic */
:root {
  --ink: #0e0c0b;          /* darkroom black */
  --ink-2: #171412;
  --ink-3: #221e1b;
  --paper: #efe7da;        /* fiber paper */
  --paper-dim: #a59b8c;
  --safelight: #ff3d1f;    /* safelight red */
  --amber: #ffb547;
  --line: rgba(239, 231, 218, .12);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Familjen Grotesk", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
::selection { background: var(--safelight); color: var(--ink); }

/* film grain */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: linear-gradient(var(--ink) 30%, transparent);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.logo em { color: var(--safelight); font-size: 1.3rem; margin-left: 2px; }
.logo-mark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--paper); position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--safelight);
}
.nav nav { display: flex; gap: 26px; align-items: center; font-weight: 500; font-size: .95rem; }
.nav nav a { display: flex; align-items: baseline; gap: 6px; transition: color .2s; }
.nav nav a .mono { color: var(--paper-dim); font-size: .62rem; }
.nav nav a:hover { color: var(--safelight); }
.nav-cta { border: 1px solid var(--paper); padding: 8px 16px; border-radius: 2px; }
.nav-cta:hover { background: var(--safelight); border-color: var(--safelight); color: var(--ink) !important; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter) 80px;
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(255, 61, 31, .18), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(255, 181, 71, .08), transparent 70%);
}
.viewfinder { position: absolute; inset: 96px var(--gutter) 40px; pointer-events: none; }
.corner { position: absolute; width: 34px; height: 34px; border: 0 solid var(--paper); opacity: .55; }
.corner.tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner.tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.focus {
  position: absolute; right: 18%; top: 34%; width: 64px; height: 64px;
  border: 1.5px solid var(--safelight); opacity: 0;
  animation: focus 1.4s 1.1s cubic-bezier(.2,.8,.2,1) forwards;
}
.focus::before, .focus::after { content: ""; position: absolute; background: var(--safelight); }
.focus::before { left: 50%; top: -10px; bottom: -10px; width: 1.5px; transform: translateX(-50%) scaleY(.3); }
.focus::after { top: 50%; left: -10px; right: -10px; height: 1.5px; transform: translateY(-50%) scaleX(.3); }
@keyframes focus {
  0% { opacity: 0; transform: scale(1.8); }
  50% { opacity: 1; transform: scale(.9); }
  70% { transform: scale(1.05); }
  100% { opacity: .9; transform: scale(1); }
}
.readout {
  position: absolute; left: 48px; right: 48px;
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: var(--paper-dim);
}
.readout.top { top: 10px; }
.readout.bottom { bottom: 10px; }
.readout b { color: var(--safelight); font-weight: 500; }
.rec { color: var(--safelight); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.hero-copy { position: relative; max-width: 1100px; }
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--safelight); margin-bottom: 28px; }
.hero h1 {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  line-height: .9; letter-spacing: -.045em;
}
.hero h1 .line { display: block; }
.hero h1 em { font-size: 1.04em; letter-spacing: -.02em; color: var(--paper); }
.safelight { color: var(--safelight); }
.lede { max-width: 44ch; margin: 36px 0 40px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--paper-dim); }
.hero-actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; gap: 10px; align-items: center;
  background: var(--safelight); color: var(--ink);
  font-weight: 700; padding: 16px 28px; border-radius: 2px;
  transition: transform .2s, box-shadow .2s;
}
.btn span { transition: transform .2s; }
.btn:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--paper); }
.btn:hover span { transform: translateX(4px); }
.btn-text { font-weight: 500; border-bottom: 1px solid var(--paper-dim); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.btn-text:hover { color: var(--safelight); border-color: var(--safelight); }

/* page-load stagger */
.load { opacity: 0; transform: translateY(28px); animation: rise .9s calc(var(--d) * .1s + .15s) cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden; border-block: 1px solid var(--line);
  background: var(--safelight); color: var(--ink);
  transform: rotate(-1.2deg) scale(1.02); margin: 10px 0 40px;
}
.ticker-track {
  display: flex; gap: 28px; width: max-content; padding: 14px 0;
  font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.6rem); letter-spacing: -.01em; text-transform: uppercase;
  animation: marquee 32s linear infinite;
}
.ticker-track i { font-style: normal; opacity: .55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 12vw, 150px) var(--gutter) 0; max-width: 1360px; margin: 0 auto; }
.section-head { display: grid; gap: 18px; margin-bottom: 56px; }
.label { color: var(--safelight); }
.section h2, .contact h2 {
  font-weight: 700; letter-spacing: -.04em; line-height: .95;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
}

/* services index */
.index { list-style: none; border-top: 1px solid var(--line); }
.index li {
  position: relative; display: grid;
  grid-template-columns: 60px minmax(200px, 1.1fr) 1.4fr 40px;
  gap: 24px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--line);
  transition: padding .35s cubic-bezier(.2,.8,.2,1);
}
.index li::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink-2); transform: scaleY(0); transform-origin: bottom;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.index li:hover { padding-left: 20px; padding-right: 20px; }
.index li:hover::before { transform: scaleY(1); }
.index .idx { color: var(--paper-dim); }
.index h3 { font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -.03em; line-height: 1; transition: color .25s; }
.index li:hover h3 { color: var(--safelight); }
.index p { color: var(--paper-dim); max-width: 46ch; }
.index .arrow { font-size: 1.4rem; justify-self: end; transition: transform .3s, color .3s; }
.index li:hover .arrow { transform: rotate(45deg); color: var(--safelight); }

/* contact sheet */
.sheet {
  background: #1b1715; padding: 14px clamp(10px, 2vw, 22px);
  border-radius: 3px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  transform: rotate(.4deg);
}
.sheet-edge {
  display: flex; justify-content: space-between; color: var(--amber); opacity: .75;
  font-size: .62rem; padding: 6px 4px;
}
.frames { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.frame { position: relative; background: #000; padding: 6px 6px 30px; border-radius: 2px; }
.f-wide { grid-column: span 2; }
.ph { aspect-ratio: 3 / 2; height: 100%; min-height: 160px; filter: saturate(.85) contrast(1.05); transition: filter .4s, transform .5s; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame:hover .ph { filter: saturate(1.1) contrast(1.1); transform: scale(1.015); }
.frame figcaption {
  position: absolute; left: 8px; right: 8px; bottom: 7px;
  display: flex; gap: 10px; font-size: .8rem; color: var(--paper-dim);
}
.frame figcaption .mono { color: var(--amber); font-size: .66rem; }
.circled::after {
  content: ""; position: absolute; inset: -10px -8px 10px -8px; pointer-events: none;
  border: 2.5px solid var(--safelight); border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  transform: rotate(-3deg); opacity: .9;
}
.p1 { background: radial-gradient(circle at 30% 40%, #ffb547, #c2421e 45%, #2a120c); }
.p2 { background: linear-gradient(160deg, #26353f, #5f8698 55%, #c9d6d6); }
.p3 { background: conic-gradient(from 200deg at 60% 50%, #efe7da, #8c8172, #2b2622, #efe7da); }
.p4 { background: linear-gradient(200deg, #9fbf6a, #3d5a2a 60%, #141a10); }
.p5 { background: repeating-linear-gradient(115deg, #ff3d1f 0 22px, #efe7da 22px 44px, #0e0c0b 44px 66px); }
.p6 { background: radial-gradient(circle at 70% 30%, #ffe8a8, #b88a2b 40%, #2a1d08); }

/* apps */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.app {
  display: block; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
}
.app:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--safelight); box-shadow: 0 24px 50px -20px rgba(255, 61, 31, .35); }
.app-bar { display: flex; gap: 6px; align-items: center; padding: 12px 14px; background: var(--ink-3); border-bottom: 1px solid var(--line); }
.app-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3430; }
.app:hover .app-bar i:first-child { background: var(--safelight); }
.app-bar .mono { margin-left: auto; color: var(--paper-dim); font-size: .62rem; }
.app-body { padding: 30px 26px 26px; min-height: 210px; display: flex; flex-direction: column; }
.app h3 { font-weight: 700; font-size: 1.7rem; letter-spacing: -.03em; }
.app p { color: var(--paper-dim); margin-top: 10px; }
.app-go { margin-top: auto; padding-top: 24px; color: var(--safelight); }

/* about */
.about { display: grid; gap: 40px; }
.pull {
  font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 3.6rem);
  line-height: 1.1; letter-spacing: -.01em; max-width: 22ch;
}
.pull em { color: var(--safelight); }
.about-body { display: grid; gap: 1em; max-width: 58ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--paper-dim); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--line); }
.facts div { padding: 22px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--paper-dim); margin-bottom: 6px; }
.facts dd { font-weight: 500; font-size: 1.1rem; }

/* contact */
.contact {
  padding: clamp(100px, 16vw, 200px) var(--gutter);
  margin-top: clamp(80px, 12vw, 150px);
  text-align: center; display: grid; justify-items: center; gap: 30px;
  background: radial-gradient(55% 60% at 50% 60%, rgba(255, 61, 31, .22), transparent 70%);
  border-top: 1px solid var(--line);
}
.contact h2 { font-size: clamp(3rem, 12vw, 10rem); }
.contact h2 em { color: var(--safelight); }
.mail {
  font-size: clamp(1.1rem, 3.2vw, 2rem); font-weight: 500;
  border-bottom: 2px solid var(--safelight); padding-bottom: 4px;
  transition: color .2s, letter-spacing .3s; word-break: break-word;
}
.mail:hover { color: var(--safelight); letter-spacing: .01em; }

footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 26px var(--gutter); border-top: 1px solid var(--line); color: var(--paper-dim);
}
footer a:hover { color: var(--safelight); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.sheet.reveal { transform: translateY(36px) rotate(.4deg); }
.sheet.reveal.in { transform: rotate(.4deg); }
.index li.reveal:nth-child(2) { transition-delay: .06s; }
.index li.reveal:nth-child(3) { transition-delay: .12s; }
.index li.reveal:nth-child(4) { transition-delay: .18s; }
.index li.reveal:nth-child(5) { transition-delay: .24s; }
.apps .app:nth-child(2) { transition-delay: .08s; }
.apps .app:nth-child(3) { transition-delay: .16s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .index li { grid-template-columns: 36px 1fr 28px; }
  .index p { grid-column: 2 / 3; }
  .index .arrow { grid-row: 1; grid-column: 3; }
  .frames { grid-template-columns: repeat(2, 1fr); }
  .readout.bottom .meter { display: none; }
  .focus { right: 10%; top: 22%; }
}
@media (max-width: 520px) {
  .readout { left: 14px; right: 14px; font-size: .6rem; }
  .readout.top span:nth-child(2) { display: none; }
  .f-wide { grid-column: span 2; }
  .ph { min-height: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .load, .reveal { opacity: 1 !important; transform: none !important; }
  .focus { opacity: .9; }
}
