/*
 * App pages.
 *
 * The palette is the parent site's — dark ground, gold rule, warm text — so a
 * subpage is recognisably part of 45to23 rather than a different site that
 * happens to be linked. Each app then brings one colour of its own, `--c`, and
 * it is used sparingly: a rule under the icon, the button, the glow behind the
 * hero. Enough that Tripmi and GlowMaxing do not feel interchangeable; not so
 * much that the pages stop matching each other.
 */

:root {
  --bg: #070502;
  --panel: #100b04;
  --text: #ede5d6;
  --muted: #a3988a;
  --gold: #e19b30;
  --line: rgba(225, 155, 48, .16);
  --line-strong: rgba(225, 155, 48, .3);
  --c: var(--gold);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.shell { width: min(1040px, 100% - 44px); margin-inline: auto; }

/* --- top bar ------------------------------------------------------------ */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 12px max(22px, calc((100vw - 1040px) / 2));
  background: rgba(7, 5, 2, .82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top__brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; letter-spacing: -.01em; text-decoration: none;
}
.top__brand img { border-radius: 7px; }
.top__nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.top__nav a { color: var(--muted); text-decoration: none; }
.top__nav a:hover { color: var(--text); }

/* --- hero --------------------------------------------------------------- */

.hero { position: relative; padding: clamp(48px, 7vw, 92px) 0 clamp(28px, 3vw, 40px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 420px;
  background: radial-gradient(70% 100% at 50% 0, var(--c), transparent 72%);
  opacity: .17; pointer-events: none;
}
.hero > * { position: relative; }

.hero__id { display: flex; align-items: center; gap: 16px; }
.hero__icon { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 0 0 1px rgba(255,255,255,.09); }
.hero__kind { margin: 0; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.hero h1 { margin: 2px 0 0; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.025em; line-height: 1.06; }

.hero__tagline {
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  font-size: clamp(21px, 2.6vw, 30px); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.2; max-width: 22ch;
}
.hero__blurb { margin: 14px 0 0; max-width: 62ch; color: var(--muted); font-size: clamp(15px, 1.35vw, 17px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 999px;
  background: var(--c); color: #0b0700; font-weight: 600; font-size: 14.5px;
  text-decoration: none; border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(255,255,255,.05); filter: none; }

/* --- screenshot --------------------------------------------------------- */

.shot-wrap { padding-bottom: clamp(40px, 5vw, 68px); }
.shot { margin: 0; border-radius: 16px; overflow: hidden; background: var(--panel);
        box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 36px 80px -34px rgba(0,0,0,.95); }

/* --- points ------------------------------------------------------------- */

.points { padding: clamp(34px, 4vw, 56px) 0; border-top: 1px solid var(--line); }
.points ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line);
             grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.points li { background: var(--bg); padding: 22px 20px; }
.points h3 { margin: 0; font-size: 15.5px; letter-spacing: -.01em; }
.points p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

/* --- closing ------------------------------------------------------------ */

.cta { padding: clamp(46px, 6vw, 78px) 0; border-top: 1px solid var(--line); text-align: center; }
.cta h2 { margin: 0; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.02em; }
.cta .btn-row { justify-content: center; }

.more { padding: clamp(30px, 4vw, 46px) 0 clamp(46px, 6vw, 70px); border-top: 1px solid var(--line); }
.more__label { margin: 0 0 14px; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  font-size: 13.5px; text-decoration: none;
}
.chip:hover { border-color: var(--line-strong); }
.chip img { border-radius: 7px; }

/* --- the index listing -------------------------------------------------- */

.apps { padding: clamp(46px, 6vw, 84px) 0; }
.apps__label { margin: 0; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.apps__title { margin: 6px 0 clamp(26px, 3vw, 38px); font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.022em; }

.apps__lede { margin: 0 0 clamp(26px, 3vw, 36px); max-width: 60ch; color: var(--muted); font-size: 15.5px; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 15px; background: var(--panel);
  text-decoration: none; transition: border-color .18s, transform .18s;
}
.card:hover { border-color: var(--c); transform: translateY(-2px); }
.card__shot { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.card__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card__body { display: flex; gap: 12px; padding: 15px 16px 18px; }
.card__icon { width: 40px; height: 40px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.card__text { min-width: 0; }
.card__text h3 { margin: 0; font-size: 15.5px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card__flag {
  font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--c); border: 1px solid var(--c); border-radius: 999px; padding: 1px 7px;
}
.card__kind { margin: 3px 0 0; font-size: 12.5px; color: var(--c); }
.card__blurb { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

/* --- footer ------------------------------------------------------------- */

.foot { padding: 34px 0 46px; border-top: 1px solid var(--line); }
.foot__name { margin: 0; font-weight: 600; font-size: 14px; }
.foot__line { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.foot__nav { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 13px; }
.foot__nav a { color: var(--muted); text-decoration: none; }
.foot__nav a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}


/* ========================================================================
   The company page.

   One idea carries it: 45 → 23 is a story about becoming something better,
   so the page should read as a climb rather than a list. The lead states
   the claim, the strip shows the evidence at a glance, the philosophy gives
   the reason, and the cards prove it.
   ======================================================================== */

.lead { position: relative; padding: clamp(56px, 8vw, 116px) 0 clamp(40px, 5vw, 64px); overflow: hidden; }

/* The glow behind the title. Gold, off-centre and low-contrast — present
   enough to lift the type off the ground, faint enough that nobody has to
   look at it. */
.lead::before {
  content: ""; position: absolute; left: 22%; top: -34%;
  width: min(1100px, 130vw); aspect-ratio: 1; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(225,155,48,.22), transparent 70%);
  pointer-events: none;
}
.lead > * { position: relative; }

.lead__grid { display: grid; gap: clamp(40px, 6vw, 70px); align-items: center; }
@media (min-width: 940px) {
  /* The text column has to hold "From Greatness" on one line — the two-line
     break is the whole shape of the title, and letting it fall to four lines
     to make room for the picture trades the stronger thing for the weaker. */
  .lead__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

.lead__eyebrow {
  margin: 0 0 18px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.lead__title {
  margin: 0; font-size: clamp(38px, 5.2vw, 62px); line-height: 1;
  letter-spacing: -.038em; font-weight: 700;
}
/*
 * Each half is a line by intent.
 *
 * Not enforced with `white-space: nowrap`: a headline that refuses to wrap
 * makes the whole page scroll sideways the moment it does not fit, and that is
 * a worse failure than a title on three lines. The size is set so it fits
 * instead, and `balance` keeps the break sensible if it ever has to wrap.
 */
.lead__title span { display: block; text-wrap: balance; }
@media (max-width: 939px) {
  .lead__title { font-size: clamp(34px, 7.6vw, 68px); }
}
.lead__title--accent {
  background: linear-gradient(96deg, var(--gold) 8%, #f6d38a 46%, var(--gold) 82%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead__lede {
  margin: clamp(20px, 2.4vw, 28px) 0 0; max-width: 52ch;
  font-size: clamp(16px, 1.45vw, 18px); color: var(--muted);
}

/* --- the hero stack ------------------------------------------------------

   Three real product screens, angled and overlapped. "Ten products" is a
   claim; this is the evidence, and it arrives before anybody scrolls.

   Built with transforms on a perspective parent rather than as a flat
   collage, so the layers keep their depth at any width. */

.stack { perspective: 1400px; }
.stack__inner {
  position: relative; aspect-ratio: 4 / 3.4;
  transform-style: preserve-3d;
  animation: stack-settle .9s cubic-bezier(.2,.8,.25,1) both;
}
.stack__card {
  position: absolute; margin: 0; width: 78%;
  border-radius: 12px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 30px 60px -24px rgba(0,0,0,.95);
  transition: translate .5s cubic-bezier(.2,.7,.3,1);
}
/* Each layer gets its product's colour as a thin top edge — the only place
   the accent appears here, so three screenshots do not turn into a smear. */
.stack__card::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: var(--c); opacity: .85;
}
.stack__card img { width: 100%; height: auto; display: block; }

.stack__card--1 { left: 0;   top: 2%;  rotate: -5deg; z-index: 1; opacity: .8;  width: 76%; }
.stack__card--2 { left: 9%;  top: 20%; rotate: -1deg; z-index: 3; width: 84%; }
.stack__card--3 { left: 20%; top: 40%; rotate: 4deg;  z-index: 2; opacity: .88; width: 76%; }

.stack:hover .stack__card--1 { translate: -8px -8px; }
.stack:hover .stack__card--3 { translate: 8px 8px; }

@keyframes stack-settle {
  from { opacity: 0; transform: translateY(22px) rotateX(9deg) scale(.97); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 939px) {
  .stack__inner { aspect-ratio: 5 / 3.4; }
  .stack__card--1 { left: 0; top: 4%; width: 72%; }
  .stack__card--2 { left: 14%; top: 18%; width: 76%; }
  .stack__card--3 { left: 28%; top: 34%; width: 70%; }
}

@media (prefers-reduced-motion: reduce) {
  .stack__inner { animation: none; }
  .stack__card { transition: none; }
}

.stats {
  list-style: none; margin: clamp(38px, 5vw, 60px) 0 0; padding: 0;
  display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.stats li { background: var(--bg); padding: 18px 20px; }
.stat__n { display: block; font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -.03em; }
.stat__l { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }

/* --- the product strip -------------------------------------------------- */

/* Ten icons in a row that drifts. It is the fastest way to say "this is a
   portfolio, not a product" — and it stops moving the moment somebody
   reaches for it, or asks not to be moved. */
.strip { padding: clamp(10px, 2vw, 22px) 0 clamp(34px, 5vw, 56px); }
.strip__rail {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.strip__row {
  display: flex; gap: 12px; width: max-content;
  animation: drift 46s linear infinite;
}
.strip__rail:hover .strip__row { animation-play-state: paused; }
@keyframes drift { to { translate: -50% 0; } }

.tile {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 9px 16px 9px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  font-size: 14px; text-decoration: none; white-space: nowrap;
}
.tile:hover { border-color: var(--c); }
.tile img { width: 34px; height: 34px; border-radius: 9px; }

@media (prefers-reduced-motion: reduce) {
  .strip__row { animation: none; }
  .strip__rail { overflow-x: auto; }
}

/* --- philosophy --------------------------------------------------------- */

.phil { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.phil__title {
  margin: 6px 0 0; font-size: clamp(44px, 8vw, 92px);
  letter-spacing: -.05em; font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, var(--text) 30%, rgba(237,229,214,.35));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.phil__lede { margin: 22px 0 0; max-width: 62ch; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); }

.acts {
  list-style: none; margin: clamp(34px, 4.5vw, 54px) 0 0; padding: 0;
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  counter-reset: act;
}
.acts li {
  position: relative; padding: 24px 22px 26px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--panel);
}
/* A gold hairline along the top edge, brightest at the left — each act
   picking up where the last one stopped. */
.acts li::before {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
}
.act__n { font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--gold); }
.acts h3 { margin: 10px 0 0; font-size: 19px; letter-spacing: -.015em; }
.acts p { margin: 9px 0 0; font-size: 14.5px; color: var(--muted); }

.phil__close {
  margin: clamp(32px, 4vw, 48px) 0 0; text-align: center;
  font-size: clamp(17px, 2vw, 23px); letter-spacing: -.015em; color: var(--text);
}

.apps__all { margin: clamp(26px, 3vw, 36px) 0 0; }
.apps__all a { color: var(--gold); text-decoration: none; font-size: 15px; font-weight: 500; }
.apps__all a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .lead__title { letter-spacing: -.03em; }
}


/* ========================================================================
   The catalogue.

   Ten cards at one size read as a folder. What makes this a portfolio is
   hierarchy: the flagship gets a band of its own, the rest sit under three
   headings that say what the company actually does.
   ======================================================================== */

.cat-lead { padding: clamp(56px, 8vw, 104px) 0 clamp(30px, 4vw, 46px); }
.cat-lead h1 {
  margin: 6px 0 0; font-size: clamp(34px, 5.6vw, 60px);
  letter-spacing: -.035em; font-weight: 700; line-height: 1.02;
}
.cat-lead .apps__lede { margin-top: 18px; }

/* --- the flagship ------------------------------------------------------- */

.feature {
  position: relative; display: grid; gap: clamp(20px, 3vw, 40px);
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--panel); text-decoration: none; overflow: hidden;
  transition: border-color .2s;
}
@media (min-width: 900px) { .feature { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); align-items: center; } }
.feature:hover { border-color: var(--c); }

/* The product's own colour, washed in from its corner. One band, so the
   flagship reads as a different kind of thing rather than a bigger card. */
.feature::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 130% at 100% 0, var(--c), transparent 62%);
  opacity: .13;
}
.feature > * { position: relative; }

.feature__flag {
  display: inline-block; margin-bottom: 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c); border: 1px solid var(--c); border-radius: 999px; padding: 3px 10px;
}
.feature__icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.feature h3 { margin: 14px 0 0; font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -.025em; }
.feature__tagline { margin: 8px 0 0; font-size: clamp(16px, 1.6vw, 19px); font-weight: 600; letter-spacing: -.012em; }
.feature__blurb { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; max-width: 46ch; }
.feature__go { display: inline-block; margin-top: 18px; color: var(--c); font-weight: 600; font-size: 14.5px; }
.lede__store { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }

.feature__shot {
  margin: 0; border-radius: 13px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 28px 60px -30px rgba(0,0,0,.9);
}

/* --- groups ------------------------------------------------------------- */

.group { padding: clamp(40px, 6vw, 72px) 0 0; }
.group__head { position: relative; margin-bottom: clamp(18px, 2.4vw, 26px); padding-right: 60px; }
.group__head h2 { margin: 0; font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -.022em; }
.group__head p { margin: 7px 0 0; max-width: 60ch; color: var(--muted); font-size: 14.5px; }
/* The count, set large and faint — a marker you can skim by, not a label to
   read. */
.group__count {
  position: absolute; right: 0; top: -6px;
  font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong);
}

.catalogue { padding-bottom: clamp(56px, 8vw, 96px); }

/* Cards get a little more life here than on the home page: the screenshot
   lifts on hover, so a grid of them does not sit completely inert. */
.catalogue .card__shot img { transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.catalogue .card:hover .card__shot img { transform: scale(1.045); }

@media (prefers-reduced-motion: reduce) {
  .catalogue .card__shot img,
  .feature { transition: none; }
  .catalogue .card:hover .card__shot img { transform: none; }
}
