/* Project Hub – landing page. One screen: big serif, the recorder as a live object, two ways to download.
   The colours are the app's: app blue, midnight, the recorder's warm body and the lamp's red. */

:root {
  --night: #0B0F19; --night-2: #0E1D3A; --ink: #F3F1EC; --ink-2: #B9C2E0; --ink-3: #7C87AC;
  --paper: #EFE9DE; --paper-2: #E5DDCE; --print: #222327; --print-2: #5E5B55; --print-3: #9A958C;
  --blue: #3857C0; --blue-hi: #6687F2; --blue-deep: #22357F; --lamp: #ED4529; --amber: #F7A928;
  --body: #F1EFEA; --body-2: #E2DFD9; --hole: rgba(92,89,84,.38);
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { background: var(--night); overflow-x: clip; }
body { margin: 0; color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
[dir="rtl"] body { font-family: -apple-system, "SF Arabic", "Geeza Pro", "Segoe UI", sans-serif; }
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
em { font-style: italic; }
[dir="rtl"] em { font-style: normal; }

.num { font: 500 12px/1 var(--mono); letter-spacing: .08em; opacity: .7; }
.kicker { display: flex; gap: 14px; align-items: center; margin: 0 0 28px; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.kicker::after { content: ""; flex: 0 0 64px; height: 1px; background: currentColor; opacity: .35; }
[dir="rtl"] .kicker { letter-spacing: 0; }
.body { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; max-width: 46ch; margin: 0; }
.center { text-align: center; margin-inline: auto; }
.fine { font: 500 13px/1.4 var(--mono); letter-spacing: .04em; color: var(--ink-3); }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; margin: 0; }
[dir="rtl"] h1, [dir="rtl"] h2 { font-family: inherit; font-weight: 650; letter-spacing: 0; }
h1 em, h2 em { color: var(--blue-hi); }

/* Bar */
.bar { display: flex; align-items: center; gap: 22px; padding: 18px var(--gutter); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 20px/1 var(--serif); letter-spacing: -.02em; margin-inline-end: auto; }
.mark img { width: 28px; height: 28px; border-radius: 7px; }
.langs { display: flex; gap: 4px; }
.langs button { border: 0; background: none; padding: 6px 8px; font: 500 12px/1 var(--mono); letter-spacing: .1em; color: var(--ink-3); cursor: pointer; border-bottom: 1px solid transparent; }
.langs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.store img { height: 44px; width: auto; }

/* 01 · Hero */
body { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto;
  background: radial-gradient(110% 80% at 72% 45%, rgba(56,87,192,.22), transparent 60%), linear-gradient(180deg, #0B0F19 0%, #0D1428 100%); }
.hero { padding: clamp(8px, 2vh, 28px) var(--gutter) clamp(24px, 4vh, 48px); display: grid; gap: clamp(28px, 5vh, 56px); align-items: center; align-content: center; }
@media (min-width: 1040px) { .hero { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); } }
h1 { font-size: clamp(46px, min(7vw, 11vh), 112px); line-height: .92; }
h1 span, h1 em { display: block; }
.lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 34ch; margin: clamp(18px, 3vh, 30px) 0 clamp(22px, 3.5vh, 34px); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.cta { gap: 14px; margin-bottom: 18px; }
.cta .store img { height: 52px; }
.store.mac { height: 52px; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px 0 14px; border-radius: 10px; text-decoration: none;
  color: #fff; background: #000; box-shadow: inset 0 0 0 1px #A6A6A6; transition: background .2s; }
.store.mac:hover { background: #151515; }
.store.mac svg { width: 28px; height: 28px; flex: none; }
.store.mac span { display: grid; line-height: 1.05; }
.store.mac small { font-size: 11px; letter-spacing: .02em; }
.store.mac b { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }

/* The recorder – the widget rebuilt as a live object */
.hero-object { margin: 0; display: grid; justify-items: center; gap: 30px; perspective: 1600px; }
.recorder { --w: min(600px, 92vw, 92vh); width: var(--w); aspect-ratio: 364 / 170; position: relative; display: grid; grid-template-columns: 1.08fr 1fr;
  border-radius: calc(var(--w) * .085); padding: calc(var(--w) * .044);
  background: radial-gradient(140% 120% at 20% 0%, #FBFAF7, var(--body) 45%, var(--body-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -2px 6px rgba(0,0,0,.08), 0 40px 80px -20px rgba(0,0,0,.6),
    0 80px 160px -40px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.06);
  color: var(--print); transform-style: preserve-3d; transition: transform .6s var(--ease); font-family: var(--sans); }
.recorder::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .48  0 0 0 0 .45  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.rec-left { display: grid; grid-template-rows: 1fr auto; gap: calc(var(--w) * .022); padding-inline-end: calc(var(--w) * .04); border-inline-end: 1px solid rgba(0,0,0,.12); }
.grille { border-radius: calc(var(--w) * .03); padding: calc(var(--w) * .022); background: linear-gradient(180deg, #DBD9D3, #E8E6E1);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.18), inset 0 -1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(0,0,0,.08); }
.grille canvas { width: 100%; height: 100%; }
.dial { position: relative; height: calc(var(--w) * .07); }
.ticks { position: absolute; inset: 0 0 auto 0; height: 55%; background:
  repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0 1.5px, transparent 1.5px 25%) 0 0 / 100% 100% no-repeat,
  repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 1px, transparent 1px 5%) 0 60% / 100% 45% no-repeat; }
[dir="rtl"] .ticks, [dir="rtl"] .scale { transform: scaleX(-1); }
[dir="rtl"] .scale span { transform: scaleX(-1); }
.needle { position: absolute; top: -18%; inset-inline-start: 0; width: 2px; height: 80%; background: var(--lamp); border-radius: 2px; transition: inset-inline-start .4s linear; }
.needle::after { content: ""; position: absolute; bottom: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--lamp); }
.scale { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; font: 500 calc(var(--w) * .019)/1 var(--sans); color: var(--print-2); letter-spacing: .03em; }
.rec-right { padding-inline-start: calc(var(--w) * .045); display: grid; grid-template-rows: auto auto auto 1fr; align-content: start; }
.lamp-row { display: flex; align-items: center; gap: calc(var(--w) * .014); font: 600 calc(var(--w) * .032)/1 var(--sans); letter-spacing: .06em; }
.lamp { width: calc(var(--w) * .024); height: calc(var(--w) * .024); border-radius: 50%; background: #B9B6AF; box-shadow: inset 0 1px 2px rgba(0,0,0,.25); transition: background .2s, box-shadow .2s; }
.recorder[data-state="rec"] .lamp { background: var(--lamp); box-shadow: 0 0 0 3px rgba(237,69,41,.18), 0 0 14px rgba(237,69,41,.9); animation: lamp 1.6s infinite; }
.recorder[data-state="paused"] .lamp { background: var(--amber); box-shadow: 0 0 12px rgba(247,169,40,.7); }
@keyframes lamp { 50% { box-shadow: 0 0 0 3px rgba(237,69,41,.08), 0 0 6px rgba(237,69,41,.5); } }
.clock { font: 200 calc(var(--w) * .1)/1 var(--sans); letter-spacing: -.02em; margin-top: calc(var(--w) * .03); font-variant-numeric: tabular-nums; }
.recorder[data-state="paused"] .clock { opacity: .55; }
.route { display: flex; gap: 8px; align-items: center; margin-top: calc(var(--w) * .022); font: 500 calc(var(--w) * .027)/1 var(--sans); color: var(--print-3); letter-spacing: .02em; }
.route b { font-weight: 400; }
.keys { display: flex; align-items: flex-end; justify-content: flex-end; gap: calc(var(--w) * .03); }
.key { width: calc(var(--w) * .08); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; display: flex; gap: 4px; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #fff, #DCDAD5); box-shadow: 0 2px 4px rgba(0,0,0,.18), inset 0 -1px 1px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.06);
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
.key i { width: 3px; height: 34%; background: var(--print); border-radius: 1px; }
.recorder[data-state="rec"] .key, .recorder[data-state="paused"] .key { opacity: 1; transform: none; pointer-events: auto; }
.recorder[data-state="paused"] .key i:first-child { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--print); background: none; }
.recorder[data-state="paused"] .key i:last-child { display: none; }
.dome { width: calc(var(--w) * .145); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; position: relative; padding: 0;
  background: radial-gradient(circle at 50% 35%, #7090F5, var(--blue) 45%, var(--blue-deep) 100%);
  box-shadow: 0 0 0 calc(var(--w) * .008) #D6D3CC, 0 0 0 calc(var(--w) * .012) #F7F6F2, 0 calc(var(--w)*.012) calc(var(--w)*.03) rgba(20,30,80,.55), inset 0 -4px 10px rgba(0,0,0,.35), inset 0 3px 6px rgba(255,255,255,.35);
  transition: transform .12s, box-shadow .2s; }
.dome:active { transform: scale(.95); }
.dome::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
.dome span { position: absolute; inset: 0; margin: auto; width: 26%; height: 26%; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 10px rgba(237,69,41,.7); transition: border-radius .25s, background .25s, width .25s, height .25s; }
.recorder[data-state="rec"] .dome span, .recorder[data-state="paused"] .dome span { border-radius: 14%; background: #fff; box-shadow: none; width: 24%; height: 24%; }
.slip { position: absolute; z-index: -1; inset-inline: 9%; top: 88%; padding: 22px 22px 18px; border-radius: 0 0 12px 12px; background: #FFFEFB; color: var(--print);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); transform: translateY(-110%); opacity: 0; transition: transform 1s var(--ease), opacity .3s;
  display: grid; gap: 6px; font-size: 14px; line-height: 1.4;
  -webkit-mask: radial-gradient(7px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100%; mask: radial-gradient(7px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100%; }
.slip.out { transform: translateY(0); opacity: 1; }
.slip-k, .slip-p { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--print-3); }
.slip-p { color: var(--blue); letter-spacing: .05em; text-transform: none; font-size: 12px; }
.hero-object figcaption { display: grid; justify-items: center; text-align: center; margin-top: 6px; }
.hint { font: 500 13px/1 var(--mono); letter-spacing: .08em; color: var(--ink-2); }

[data-tilt] { transform-style: preserve-3d; transition: transform .7s var(--ease), box-shadow .7s var(--ease); will-change: transform; }

.foot { display: flex; flex-wrap: wrap; gap: 14px 26px; padding: 18px var(--gutter) 24px; font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--ink-3); border-top: 1px solid rgba(185,194,224,.12); }
.foot .grow { flex: 1; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Phones: the copy first, a smaller recorder below. */
@media (max-width: 1039px) {
  .hero { justify-items: center; text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .kicker::after { display: none; }
  .cta { justify-content: center; }
  .recorder { --w: min(520px, 90vw); }
}

/* Arrival */
.rise { opacity: 0; transform: translateY(24px); filter: blur(6px); transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease); }
.rise.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; filter: none; transition: none; }
  [data-tilt] { transition: none; }
}

/* Arabic letters join: no tracking, no monospace. */
[dir="rtl"] .fine, [dir="rtl"] .hint, [dir="rtl"] .foot { font-family: inherit; letter-spacing: 0; }
