/* samhq.app shared styles. Dark only. Variants set data-motion on <body> and override in their own <style>. */
:root {
  color-scheme: dark;
  --bg: #000; --tile: #111113; --tile2: #1c1c1f; --ink: #f5f5f7; --sub: #a1a1a6; --dim: #8e8e93;
  --acc: #2997ff; --gap: 16px; --row: 280px; --r: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  --out: cubic-bezier(.16, 1, .3, 1);
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.9%, 1.051 22.9%, 1.058 26.4%, 1.043 30.2%, 1.009 38.7%, .996 46.7%, 1.001 66.2%, 1);
}
* , *::before, *::after { box-sizing: border-box; margin: 0; }
html { background: var(--bg); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 17px/1.47 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: rgba(41,151,255,.38); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: none; }
a:focus-visible, button:focus-visible { background-color: rgba(255,255,255,.12); border-radius: 10px; }
@media (prefers-contrast: more), (forced-colors: active) { a:focus-visible, button:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; } }
.wrap { max-width: 1288px; margin: 0 auto; padding: 0 32px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; height: 72px; font-size: 14px; }
.nav .mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: -.02em; margin-right: auto; }
.nav .mark img { width: 22px; height: 22px; }
/* Coral hq (site/brand/README.md): leans toward the pointer on hover and springs upright on leave */
.hq { display: inline-block; font-style: normal; color: transparent; background: linear-gradient(#f0654f, #f0654f); -webkit-background-clip: text; background-clip: text;
  transition: rotate .5s cubic-bezier(.34, 1.56, .64, 1) var(--td, 0ms), translate .55s cubic-bezier(.34, 1.56, .64, 1) var(--td, 0ms), filter .35s ease; }
.hov .hq { rotate: var(--tilt, -7deg); translate: 0 -.04em; }
/* Film grain on the big footer hq only: noise clipped to the letter, overlay blend at 35% */
.foot .big .hq { position: relative; }
.foot .big .hq::after { content: attr(data-c); position: absolute; inset: 0; color: transparent; -webkit-background-clip: text; background-clip: text; mix-blend-mode: overlay; opacity: .35; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='2.2 0 0 0 -.6  2.2 0 0 0 -.6  2.2 0 0 0 -.6  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px;
  -webkit-background-clip: text; background-clip: text; }
.nav a.l { color: var(--sub); padding: 8px 12px; border-radius: 10px; transition: color .2s, background-color .2s; }
.nav a.l:hover { color: var(--ink); background: rgba(255,255,255,.06); }

/* Headline lines that rise out of a mask */
.ln { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.ln > span { display: block; }

/* Homebrew tap chip */
.tap { display: inline-flex; align-items: center; gap: 14px; height: 44px; padding: 0 6px 0 16px; border-radius: 22px; background: var(--tile); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); font: 500 14px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); white-space: nowrap; transition: background-color .2s; }
.tap span { font: 600 13px/1 var(--font); color: var(--ink); background: var(--tile2); height: 32px; padding: 0 14px; border-radius: 16px; display: grid; place-items: center; min-width: 74px; transition: background-color .2s; }
.tap:hover { background: #17171a; } .tap:hover span { background: #2a2a2e; }
.tap em { font-style: normal; color: var(--dim); }

/* Bento grid */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--row); gap: var(--gap);
  grid-template-areas: "hp hp tp tp" "hp hp pm sw" "pt nt me sw" "pt tc tc th"; }
.t { position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 28px; border-radius: var(--r); background: var(--tile); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .7s var(--out), box-shadow .4s, opacity .9s var(--out) var(--d, 0ms), translate 1.1s var(--out) var(--d, 0ms), scale 1.1s var(--out) var(--d, 0ms), filter .9s var(--out) var(--d, 0ms); }
.t.mv { transition: transform .14s linear, box-shadow .4s, opacity .9s var(--out) var(--d, 0ms), translate 1.1s var(--out) var(--d, 0ms), scale 1.1s var(--out) var(--d, 0ms), filter .9s var(--out) var(--d, 0ms); }
/* Cursor light: a soft spot on the surface and a brighter one on the hairline */
.t::before, .t::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .5s; z-index: -1; }
.t::before { background: radial-gradient(520px circle at var(--mx) var(--my), color-mix(in srgb, var(--tint) 16%, transparent), transparent 62%); }
.t::after { z-index: 3; padding: 1px; background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255,255,255,.42), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.t:hover::before, .t:hover::after { opacity: 1; }
.t > .cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.t > .cover:focus-visible { background: rgba(255,255,255,.06); }
.t .ic { width: 64px; height: 64px; flex: none; transition: transform .7s var(--spring); filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.t h3 { font-weight: 650; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; margin-top: 16px; }
.t p { color: var(--sub); font-size: 15px; line-height: 1.45; margin-top: 6px; max-width: 34ch; text-wrap: pretty; }
.meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; margin-top: auto; padding-top: 16px; font-size: 13px; color: var(--dim); }
.acts { display: flex; align-items: center; gap: 8px; position: relative; z-index: 2; }
.btn { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 17px; background: var(--ink); color: #000; font-weight: 600; font-size: 14px; white-space: nowrap; transition: scale .4s var(--spring), background-color .2s; }
.btn:hover { background: #fff; } .btn:active { scale: .95; transition-duration: .1s; }
.btn.soon { background: var(--tile2); color: var(--sub); cursor: default; scale: 1; }
.btn:focus-visible { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.22); border-radius: 17px; }
.ib { position: relative; width: 34px; height: 34px; border-radius: 17px; background: var(--tile2); display: grid; place-items: center; color: var(--ink); transition: background-color .2s, scale .4s var(--spring); }
.ib:hover { background: #2a2a2e; } .ib:active { scale: .92; transition-duration: .1s; }
.ib:focus-visible { border-radius: 17px; background: #34343a; }
.ib svg { width: 16px; height: 16px; }
.tip { position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 4px; padding: 6px 10px; border-radius: 9px; background: #2c2c30; color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .18s, translate .3s var(--out); box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 5; }
.ib:hover .tip, .ib:focus-visible .tip, .ib.ok .tip { opacity: 1; translate: -50% 0; }

/* Screenshots inside tiles */
.shot { pointer-events: none; }
.shot img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 60px -12px rgba(0,0,0,.7); transition: transform .9s var(--out); }
.t-xl { padding: 36px; }
.t-xl .head { display: grid; grid-template-columns: auto 1fr; gap: 0 22px; align-items: start; }
.t-xl .ic { width: 88px; height: 88px; grid-row: span 3; }
.t-xl h3 { font-size: 34px; margin-top: 4px; letter-spacing: -.03em; }
.t-xl p { font-size: 17px; max-width: 40ch; }
.t-xl .meta { margin-top: 0; padding-top: 18px; justify-content: flex-start; gap: 16px; }
.t-xl .meta .acts { order: -1; }
.t-xl .shot { position: absolute; left: 36px; right: -2px; top: 216px; }
.t-xl .shot img { border-radius: 14px 0 0 0; }
.t-wide .body { display: flex; flex-direction: column; height: 100%; width: 48%; position: relative; z-index: 2; pointer-events: none; }
.t-wide .body .acts { pointer-events: auto; }
.t-wide .ic { width: 56px; height: 56px; }
.t-wide .shot { position: absolute; left: 52%; top: 32px; width: 74%; }
.t-tall .shot { margin: 22px -28px -28px 22px; flex: 1; min-height: 0; overflow: hidden; border-radius: 14px 0 0 0; }
.t-tall .shot img { border-radius: 14px 0 0 0; }
.t-tall .meta { margin-top: 0; }
.t-m .meta { flex-direction: row; }

/* Footer */
.foot { padding-block: 160px 48px; }
.foot .big { font-weight: 700; font-size: clamp(88px, 21vw, 300px); line-height: .82; letter-spacing: -.055em; display: flex; overflow: hidden; padding-bottom: .22em; margin-bottom: -.22em; }
.foot .big span { display: block; }.foot .row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-top: 40px; font-size: 14px; color: var(--dim); }
.foot .row a { padding: 6px 10px; border-radius: 8px; transition: color .2s, background-color .2s; }
.foot .row a:first-child { margin-left: -10px; }
.foot .row a:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.foot .row span { margin-left: auto; }

/* Entrance and reveal: hidden states exist only while JS runs, so nothing stays hidden without it */
.js [data-in] { opacity: 0; translate: 0 22px; transition: opacity .9s var(--out) var(--d, 0ms), translate 1.1s var(--out) var(--d, 0ms); }
.js .ln > span { translate: 0 108%; transition: translate 1.15s var(--out) var(--d, 0ms); }
.js .t { opacity: 0; translate: 0 48px; scale: .96; }
.js .foot .big span { translate: 0 100%; transition: translate 1s var(--out) var(--d, 0ms); }
.go [data-in] { opacity: 1; translate: 0 0; }
.go .ln > span { translate: 0 0; }
.js .t.on { opacity: 1; translate: 0 0; scale: 1; }
.js .foot.on .big span { translate: 0 0; }

@media (max-width: 1100px) { :root { --row: 240px; } .t-xl .shot { top: 200px; } }
@media (max-width: 900px) {
  :root { --gap: 12px; --r: 24px; }
  .wrap { padding: 0 16px; }
  .nav { height: 60px; } .nav a.l.x { display: none; }
  .grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; grid-template-areas: "hp hp" "tp tp" "sw sw" "pm nt" "pt pt" "me th" "tc tc"; }
  .t { padding: 20px; }
  .t .ic { width: 52px; height: 52px; }
  .t h3 { font-size: 18px; margin-top: 12px; }
  .t p { font-size: 14px; }
  .t-xl { padding: 22px; }
  .t-xl .head { grid-template-columns: auto 1fr; gap: 0 14px; }
  .t-xl .ic { width: 60px; height: 60px; grid-row: span 2; }
  .t-xl h3 { font-size: 26px; margin-top: 2px; }
  .t-xl p { font-size: 15px; grid-column: 1 / -1; margin-top: 14px; }
  .t-xl .meta { grid-column: 1 / -1; }
  .t-xl .shot, .t-wide .shot { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; margin: 22px -20px -20px 0; max-height: 230px; overflow: hidden; border-radius: 14px 0 0 0; }
  .t-xl .shot { margin: 22px -22px -22px 0; }
  .t-wide .shot img { border-radius: 14px 0 0 0; }
  .t-wide .body { width: auto; height: auto; }
  .t-wide .meta { flex-direction: row; align-items: center; margin-top: 0; }
  .t-wide, .t-tall, .t-xl { overflow: hidden; }
  .t-tall .shot { margin: 20px -20px -20px 0; max-height: 240px; flex: none; }
  .t-m .meta { flex-direction: column; align-items: flex-start; }
  .foot { padding-top: 112px; }
  .foot .row span { margin-left: 0; width: 100%; padding-top: 8px; }
}
@media (max-width: 380px) { .t-m .btn { padding: 0 12px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-in], .js .t, .js .ln > span, .js .foot .big span { translate: none !important; scale: none !important; transition: opacity .4s linear !important; }
  .js .ln > span, .js .foot .big span { opacity: 1; }
  .t { transform: none !important; }
  .t .ic, .shot img { transition: none !important; transform: none !important; }
  .hq { transition: filter .2s ease; } .hov .hq { rotate: none; translate: none; filter: brightness(1.18) saturate(1.15); }
}
