/* Outernet — shared styles
   Palette and type follow the Figma "Home v2" direction. */

@font-face {
  font-family: "Soligant";
  src: url("../fonts/Soligant.woff2") format("woff2"), url("../fonts/Soligant.otf") format("opentype"), url("../fonts/Soligant.ttf") format("truetype");
  font-display: swap;
}

:root {
  --beige: #E8DDCB;
  --ink: #171412;
  --red: #7A2318;
  --coral: #E0705A;
  --sand: #CDBBA0;
  --tan: #BFA98A;
  --pad: 40px;
  --gap: 24px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--beige);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.34;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mono { font-family: var(--mono); font-size: 13px; }
.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--beige); padding: 8px 12px;
  font-family: var(--mono); font-size: 13px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px var(--pad);
}
.wordmark { font-size: 30px; text-decoration: none; line-height: 1; display: inline-block; }
.wordmark img { height: 51px; width: auto; }
.topbar nav { display: flex; gap: 28px; font-family: var(--mono); font-size: 13px; }
.topbar nav a { text-decoration: none; }
.topbar nav a:hover, .topbar nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 28px var(--pad);
  border-top: 1px solid var(--ink);
}
.footer p { font-size: 28px; }
.footer p.mono { font-size: 13px; }
.footer .mono a { text-decoration: none; }
.footer .mono a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Home ---------- */
.intro { padding: 140px var(--pad); }
.intro p { max-width: 880px; font-size: 46px; line-height: 1.17; }
.intro a { color: var(--red); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.intro a:hover { background: var(--red); color: var(--beige); text-decoration: none; }

/* one orchestrated moment: intro words appear in sequence on load */
.intro .w { opacity: 0; animation: word 0.5s ease forwards; animation-delay: calc(var(--i) * 28ms); }
@keyframes word { to { opacity: 1; } }

.stream { display: grid; gap: 112px; padding: 0 var(--pad) 140px; }
.stream .item { display: block; width: min(100%, var(--w, 560px)); text-decoration: none; }
.stream .item.right { justify-self: end; }
.stream .item.center { justify-self: center; }
.stream .item .media { transition: filter 0.2s ease; }
.stream a.item:hover .media { filter: brightness(0.94); }
.stream a.item:hover figcaption { text-decoration: underline; text-underline-offset: 4px; }
.stream .pending { cursor: default; }

/* ---------- Media blocks (images and videos with a colour fallback) ---------- */
.media { margin: 0; }
.media .frame {
  position: relative; overflow: hidden;
  background: var(--bg, var(--sand));
  aspect-ratio: var(--ar, 3 / 2);
}
.media .frame > img, .media .frame > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.media figcaption { margin-top: 10px; font-family: var(--mono); font-size: 12px; }
.bg-sand { --bg: var(--sand); }
.bg-coral { --bg: var(--coral); }
.bg-red { --bg: var(--red); }
.bg-ink { --bg: var(--ink); }
.bg-tan { --bg: var(--tan); }
.bg-paper { --bg: #D7CAB6; }
.bg-terra { --bg: #9E4624; }

/* ---------- Info page ---------- */
.photo-row { display: grid; grid-template-columns: minmax(0, 880px) 1fr; gap: var(--pad); padding: 24px var(--pad) 80px; align-items: stretch; }
.photo-row .side { display: flex; flex-direction: column; justify-content: space-between; }
.photo-row .side p { font-size: 36px; line-height: 1.22; }

.cv { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pad); padding: 0 var(--pad) 120px; align-items: start; }
.cv .col { display: grid; gap: 56px; }
.section { border-top: 1px solid var(--ink); padding-top: 14px; display: grid; gap: 28px; }
.entry { white-space: normal; }
.entry strong { font-weight: 400; font-style: italic; display: block; }
.entry .link { color: var(--red); text-underline-offset: 3px; }
.entry span { display: block; }

/* ---------- Case study ---------- */
.cs-head { padding: 96px var(--pad) 64px; display: grid; gap: 24px; }
.cs-head h1 { font-size: clamp(72px, 11.7vw, 168px); line-height: 0.93; }
.cs-head .sub { max-width: 900px; font-size: 32px; line-height: 1.25; color: var(--red); }

.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--pad); padding: 0 var(--pad) 72px; }
.meta > div, .trio > div { border-top: 1px solid var(--ink); padding-top: 14px; display: grid; gap: 20px; align-content: start; }
.meta span, .trio p { display: block; }
.meta > div { gap: 4px; }
.meta h2 { margin-bottom: 16px; }

.hero { padding: 0 var(--pad) 120px; }

.overview { display: grid; grid-template-columns: 300px 1fr; gap: var(--pad); padding: 0 var(--pad) 120px; }
.overview .label { padding-top: 14px; }
.overview p { font-size: 40px; line-height: 1.25; max-width: 960px; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pad); padding: 0 var(--pad) 140px; }
.trio p { line-height: 1.33; }

.block { padding: 0 var(--pad) 140px; display: grid; gap: 32px; }
.block > h2.label { border-top: 1px solid var(--ink); padding-top: 14px; font-weight: 400; }

.identity { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--gap); aspect-ratio: 1360 / 640; }
.identity .media { display: flex; flex-direction: column; min-height: 0; }
.identity .media .frame { flex: 1; aspect-ratio: auto; min-height: 0; }
.identity .big { grid-row: 1 / span 2; display: flex; flex-direction: column; min-height: 0; }
.identity .big .media { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.swatch {
  min-height: 240px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--c); color: var(--fg, var(--ink)); font-family: var(--mono); font-size: 12px;
}
.swatch.outlined { border: 1px solid var(--ink); }

.type-row { display: grid; grid-template-columns: 1fr 440px; gap: var(--gap); min-height: 440px; }
.type-card { padding: 16px; display: flex; flex-direction: column; justify-content: space-between; background: var(--bg); font-family: var(--mono); font-size: 12px; }
.type-card .aa { line-height: 0.9; }
.type-card.serif .aa { font-family: "Charis SIL", Charter, Georgia, serif; font-size: 280px; }
.type-card.sans .aa { font-family: "Railway Sans", "Helvetica Neue", Arial, sans-serif; font-size: 160px; }

.gallery { display: grid; gap: var(--gap); }
.gallery .row { display: grid; gap: var(--gap); }
.row.c1 { grid-template-columns: 1fr; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: repeat(3, 1fr); }
.row.wide { grid-template-columns: 1fr 540px; align-items: start; }
.row.wide .frame { aspect-ratio: auto; height: 560px; }
.statement { display: grid; grid-template-columns: 560px 1fr; gap: var(--pad); padding: 96px 0; align-items: start; }
.statement h3 { font-size: 64px; line-height: 1.06; }
.statement p { font-size: 30px; line-height: 1.33; max-width: 760px; }
.values { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding: 0; list-style: none; }
.values li { border: 1px solid var(--ink); border-radius: 999px; padding: 8px 18px; font-family: var(--mono); font-size: 13px; }

.credits { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pad); padding: 0 var(--pad) 140px; }
.credits > div { border-top: 1px solid var(--ink); padding-top: 14px; display: grid; gap: 20px; align-content: start; }
.credits ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.credits a, .link { color: var(--red); text-underline-offset: 3px; }

.next { display: block; border-top: 1px solid var(--ink); padding: 14px var(--pad) 120px; text-decoration: none; }
.next .big { display: block; margin-top: 16px; font-size: clamp(64px, 9.7vw, 140px); line-height: 1; }
.next .arrow { color: var(--red); }
.next:hover .big { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 10px; }

/* ---------- Branding index + soon ---------- */
.index-head { padding: 96px var(--pad) 48px; }
.index-head h1 { font-size: clamp(64px, 9vw, 128px); line-height: 1; }
.list { padding: 0 var(--pad) 140px; display: grid; }
.list a { display: grid; grid-template-columns: 120px 1fr 1fr 120px; gap: var(--pad); padding: 22px 0; border-top: 1px solid var(--ink); text-decoration: none; align-items: baseline; }
.list a:last-child { border-bottom: 1px solid var(--ink); }
.list a:hover .t { text-decoration: underline; text-underline-offset: 6px; }
.list .t { font-size: 40px; line-height: 1.1; }
.soon { padding: 140px var(--pad); min-height: 60vh; }
.soon p { font-size: 46px; line-height: 1.17; max-width: 720px; }
.soon .label { display: block; margin-bottom: 24px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 960px) {
  :root { --pad: 20px; --gap: 12px; }
  body { font-size: 19px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 14px; }
  .intro { padding: 72px var(--pad); }
  .intro p, .soon p { font-size: 32px; }
  .stream { gap: 64px; }
  .stream .item, .stream .item.right, .stream .item.center { width: 100%; justify-self: stretch; }
  .photo-row { grid-template-columns: 1fr; }
  .photo-row .side { gap: 24px; }
  .photo-row .side p { font-size: 28px; }
  .cv, .trio, .credits { grid-template-columns: 1fr; }
  .cv { gap: 56px; }
  .meta { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .overview { grid-template-columns: 1fr; gap: 8px; }
  .overview p { font-size: 28px; }
  .cs-head { padding-top: 56px; }
  .cs-head .sub { font-size: 24px; }
  .identity { aspect-ratio: auto; grid-template-columns: 1fr; grid-template-rows: none; }
  .identity .big { grid-row: auto; }
  .identity .media .frame { flex: none; aspect-ratio: 7 / 5; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .swatch { min-height: 140px; }
  .type-row { grid-template-columns: 1fr; min-height: 0; }
  .type-card { min-height: 280px; }
  .type-card.serif .aa { font-size: 180px; }
  .row.c2, .row.c3, .row.wide { grid-template-columns: 1fr; }
  .row.wide .frame { height: auto; aspect-ratio: var(--ar, 3 / 2); }
  .statement { grid-template-columns: 1fr; padding: 56px 0; gap: 20px; }
  .statement h3 { font-size: 44px; }
  .statement p { font-size: 24px; }
  .list a { grid-template-columns: 1fr; gap: 6px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .intro .w { animation: none; opacity: 1; }
  .stream .item .media { transition: none; }
}

/* ---------- Santosha specifics ---------- */
.primary .frame { container-type: inline-size; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff6db; pointer-events: none; }
.stars .spin { transform-origin: 448px 320px; animation: spin 20s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wordmark-big {
  position: absolute; left: 0; right: 0; top: 50%;
  text-align: center; color: #1b1b1b; line-height: 1;
  font-family: "Soligant", var(--serif); font-size: 12cqw;
}
.media .frame > img.overlay-logo { inset: auto; left: 25.4%; top: 30.8%; width: 49.6%; height: auto; object-fit: contain; }
.overview.mission p { font-size: 32px; line-height: 1.3; }
.overview.mission p + p { margin-top: 24px; }
.statement.solo { grid-template-columns: 1fr; }
.statement.solo h3 { max-width: 1100px; }
@media (max-width: 960px) {
  .wordmark img { height: 40px; }
  .overview.mission p { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .stars .spin { animation: none; }
}

/* ---------- Case study: match the Figma frame (lighter page, 40px corners) ---------- */
body.case { background: #F4EFE6; }
.case .media .frame { border-radius: 40px; }
.case .swatches { border-radius: 40px; overflow: hidden; }
.case .type-card { border-radius: 40px; }
.footer { justify-content: flex-start; }
@media (max-width: 960px) {
  .case .media .frame, .case .swatches, .case .type-card { border-radius: 24px; }
}
