/* tylerscheitlin.com — dark editorial mosaic */
:root {
  --bg: #0E0E0D;
  --fg: #EDEAE2;
  --muted: #B3AFA6;
  --grey: #9A9A9A;
  --line: #2C2C29;
  --tile: #1E1E1C;
  --teal: #3B7265;
  --teal-lift: #4F8F7F;
  --teal-hover: #6FB3A1;
  --ink: #161614;
  --display: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --gap: clamp(10px, 1.2vw, 20px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--display); -webkit-font-smoothing: antialiased; }
a { color: var(--fg); }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 2px solid var(--teal-hover); outline-offset: 3px; border-radius: 4px; }
img, video, iframe { max-width: 100%; }

.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.wrap { max-width: 1760px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px) 96px; }

/* Header */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 32px; }
.logo { display: flex; flex-direction: column; gap: 2px; text-decoration: none; text-transform: uppercase; }
.logo-name { font-weight: 700; font-size: 22px; letter-spacing: 0.01em; }
.grey { color: var(--grey); } .teal { color: var(--teal-lift); }
.logo-role { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--grey); }
.nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--grey); }
.nav a.on { color: var(--fg); }
.nav a:hover { color: var(--teal-hover); }

/* Home intro */
.intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding: clamp(56px, 8vw, 128px) 0 clamp(32px, 4vw, 64px); }
.tag { margin: 0; line-height: 0.92; font-weight: 600; letter-spacing: -0.045em; flex: 1 1 420px; font-size: clamp(44px, 5.2vw, 140px); white-space: nowrap; }
.tag .w { display: inline; }
.intro p { margin: 0; flex: 0 1 360px; font-size: 18px; line-height: 1.5; color: var(--muted); }

/* Mosaic */
.mg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s6 { grid-column: span 6; }
.hl { height: clamp(300px, 34vw, 620px); } .hm { height: clamp(240px, 25vw, 460px); } .hs { height: clamp(200px, 20vw, 370px); }
.cell { display: block; text-decoration: none; }
.tile { display: block; position: relative; overflow: hidden; border-radius: 6px; background: var(--tile); }
.tile img, .tile video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .4s ease; }
.tile video { opacity: 0; pointer-events: none; }
.cell:hover .tile video, .cell:focus-visible .tile video { opacity: 1; }
.cell:hover .tile img, .cell:hover .tile video { transform: scale(1.04); }
.cap { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px 18px; font-size: 15px; }
.cap b { font-weight: 600; }
.cap span { font-family: var(--mono); font-size: 12px; color: var(--grey); text-align: right; white-space: nowrap; }
.lab { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 200px; padding: clamp(24px, 3vw, 44px); border-radius: 6px; color: var(--ink); text-decoration: none;
  background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(../media/lab.jpg) center / cover no-repeat #E9C9B8; }
.lab:hover { color: var(--ink); }
.lab .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; color: #1E1D1B; }
.lab .h { font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.lab .b { display: inline-flex; align-self: flex-start; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: #F4F1EA; font-weight: 600; }

/* Scroll reveal */
.rv { transition: opacity .8s ease, transform 1s cubic-bezier(.16,.84,.3,1); }
.rv.pre { opacity: 0; transform: translateY(48px); }

/* Project page */
.back { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); text-decoration: none; }
.phead { padding: clamp(48px, 7vw, 112px) 0 clamp(28px, 3vw, 48px); }
.ttl { margin: 16px 0 0; line-height: 0.95; font-weight: 600; letter-spacing: -0.04em; font-size: clamp(44px, 6.5vw, 120px); text-wrap: balance; }
.ttl em { font-style: normal; color: var(--teal-lift); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin: 0 0 clamp(28px, 3vw, 48px); padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }
.meta dd { margin: 6px 0 0; font-size: 17px; }

.fr { display: block; position: relative; overflow: hidden; border-radius: 6px; background: var(--tile); max-width: 100%; }
.fr > img, .fr > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.fr iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.fr.playing { background: #000; }
.a169 { aspect-ratio: 16 / 9; } .a239 { aspect-ratio: 2.39 / 1; } .a43 { aspect-ratio: 4 / 3; } .a45 { aspect-ratio: 4 / 5; }

.play { position: absolute; left: clamp(16px, 2vw, 32px); bottom: clamp(16px, 2vw, 32px); display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 22px 0 16px; border: 0; border-radius: 999px; background: var(--fg); color: var(--ink); font: 600 15px var(--display); cursor: pointer; }
.play:hover { background: #fff; }
.bigplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 0; padding: 0; cursor: pointer; background: linear-gradient(rgba(14,14,13,0), rgba(14,14,13,.35)); }
.bigplay span { display: flex; align-items: center; justify-content: center; width: clamp(72px, 7vw, 104px); height: clamp(72px, 7vw, 104px); border-radius: 999px; background: rgba(237,234,226,.92); transition: transform .3s ease, background .3s ease; }
.bigplay:hover span { transform: scale(1.06); background: var(--fg); }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 64px); padding-top: clamp(48px, 6vw, 96px); }
.two .k { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }
.brief { max-width: 880px; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.4; color: #D9D5CB; }
.brief p { margin: 0; }
.brief p + p { margin-top: 20px; font-size: 17px; line-height: 1.6; color: var(--muted); }

.g { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(48px, 6vw, 96px); }
.f6 { grid-column: span 6; } .f3 { grid-column: span 3; } .f2 { grid-column: span 2; }

.be { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: clamp(48px, 6vw, 96px); padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.be .k { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.be .h { font-size: clamp(22px, 2.2vw, 32px); font-weight: 600; letter-spacing: -0.02em; }
.be .b { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--teal); color: #fff; font-weight: 600; }
.soon { margin: 16px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); }

.nx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 3vw, 48px); margin-top: clamp(64px, 8vw, 128px); padding-top: 32px; border-top: 1px solid var(--line); text-decoration: none; }
.nx .k { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); margin-bottom: 10px; }
.nx .h { font-size: clamp(32px, 4vw, 64px); line-height: 1; font-weight: 600; letter-spacing: -0.035em; }

/* Say Hello */
.hello { padding-top: clamp(48px, 7vw, 112px); }
.hello .k { margin: 0 0 24px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }
.hello-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: end; gap: clamp(32px, 5vw, 96px); }
.bio { margin: 0; max-width: 22ch; font-size: clamp(28px, 3.4vw, 56px); line-height: 1.12; font-weight: 600; letter-spacing: -0.03em; text-wrap: pretty; }
.bio em { font-style: normal; color: var(--teal-lift); }
.portrait { margin: 0; justify-self: end; width: 100%; max-width: 440px; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 6px; filter: grayscale(1); background: var(--tile); }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(56px, 7vw, 112px); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); }
.lead { margin: 0; max-width: 26ch; font-size: 20px; line-height: 1.45; color: var(--muted); }
.lead a { color: var(--fg); text-underline-offset: 3px; }
.form { display: grid; gap: 18px; max-width: 760px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: rgba(22,22,20,.85); color: var(--fg); font: 400 16px/1.5 var(--display); transition: border-color .2s ease; }
.field textarea { min-height: 180px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #77746D; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal-lift); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #E8A08A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.send { display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--teal); color: #fff; font: 600 16px var(--display); cursor: pointer; transition: background .2s ease; }
.send:hover { background: var(--teal-lift); }
.send[disabled] { opacity: .6; cursor: progress; }
.status { margin: 0; font-size: 15px; color: var(--muted); }
.status.ok { color: var(--teal-hover); } .status.err { color: #E8A08A; }

.foot { margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 16px; }
.muted { color: var(--muted); }

/* Extra-wide: 12-column mosaic */
@media (min-width: 1600px) {
  .wrap { max-width: 2240px; }
  .mg { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .x3 { grid-column: span 3; } .x4 { grid-column: span 4; } .x6 { grid-column: span 6; } .x12 { grid-column: span 12; }
  .yl { height: clamp(420px, 27vw, 720px); } .ym { height: clamp(300px, 19vw, 500px); } .ys { height: clamp(240px, 14.5vw, 380px); }
}
/* Medium: two columns */
@media (max-width: 1100px) {
  .tag { font-size: clamp(44px, 12vw, 120px); white-space: normal; }
  .tag .w { display: block; }
  .mg { grid-auto-flow: dense; }
  .s2, .s3 { grid-column: span 3; } .s4, .s6, .lab { grid-column: span 6; }
  .hl, .hm, .hs { height: auto; aspect-ratio: 16 / 9; }
  .s4.hl { aspect-ratio: 2 / 1; }
}
@media (max-width: 900px) {
  .two, .nx, .contact { grid-template-columns: minmax(0, 1fr); }
  .hello-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .portrait { justify-self: start; }
}
/* Small: one column */
@media (max-width: 640px) {
  .s2, .s3, .s4, .s6, .lab { grid-column: span 6; }
  .s4.hl { aspect-ratio: 16 / 9; }
  .f3, .f2 { grid-column: span 6; } .a43, .a45 { aspect-ratio: 16 / 9; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .send { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .rv, .tile img, .tile video { transition: none; }
  .rv.pre { opacity: 1; transform: none; }
}
