/* Elif Apps: shared styles (home, app pages, 404).
   Mood: dark glass with a neon edge (blue at one end, warm at the other), from
   the Dotnote v08 logo. Light theme: porcelain glass with the same edge. */

/* ---------- fonts (self-hosted, SIL OFL 1.1, licences in /vendor/fonts/) ---------- */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/vendor/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/vendor/fonts/fraunces-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/vendor/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/vendor/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --bg-2: #e8ecf3;
  --bg-hero: linear-gradient(180deg, transparent 68%, var(--bg)),
             radial-gradient(1200px 700px at 78% 30%, rgba(77, 180, 255, .16), transparent 60%),
             radial-gradient(900px 600px at 20% 66%, rgba(255, 126, 99, .12), transparent 60%),
             linear-gradient(180deg, #f6f8fc 0%, #eef1f7 100%);
  --ink: #0e1117;
  --ink-2: #353b48;
  --muted: #565d6c;
  --line: rgba(14, 17, 23, .10);
  --line-2: rgba(14, 17, 23, .16);
  --glass: rgba(255, 255, 255, .62);
  --glass-2: rgba(255, 255, 255, .84);
  --glass-edge: rgba(255, 255, 255, .95);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 24px 60px -28px rgba(22, 32, 64, .32), 0 2px 6px rgba(22, 32, 64, .06);
  --link: #1c64d6;
  --btn-bg: #0e1117;
  --btn-fg: #ffffff;
  --btn-glass: rgba(14, 17, 23, .05);
  --focus: #1c64d6;
  --neon: linear-gradient(90deg, #6fd2ff 0%, #4db4ff 26%, #9c9bff 44%, #ff8fa6 56%, #ff9a6a 72%, #ffc062 100%);
  --neon-text: linear-gradient(90deg, #1667d9 0%, #5b4fe0 38%, #d93a70 66%, #c95a12 100%);
  --ink-grad: linear-gradient(180deg, #ffd27a 0%, #ffb347 22%, #ff7e63 66%, #ff5e8a 100%);
  --gold: #fbc93a;
  --radius: 22px;
  --radius-s: 14px;
  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07080b;
    --bg-2: #0c0e13;
    --bg-hero: linear-gradient(180deg, transparent 68%, var(--bg)),
               radial-gradient(1100px 700px at 76% 32%, rgba(77, 180, 255, .13), transparent 60%),
               radial-gradient(900px 640px at 18% 62%, rgba(255, 94, 138, .09), transparent 62%),
               linear-gradient(180deg, #090a0e 0%, #07080b 100%);
    --ink: #eef0f6;
    --ink-2: #c6cbd6;
    --muted: #9ba2b1;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --glass: rgba(20, 22, 29, .56);
    --glass-2: rgba(24, 26, 34, .82);
    --glass-edge: rgba(255, 255, 255, .10);
    --glass-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 70px -30px rgba(0, 0, 0, .85);
    --link: #7cc4ff;
    --btn-bg: #f1f3f8;
    --btn-fg: #0a0b0f;
    --btn-glass: rgba(255, 255, 255, .06);
    --focus: #7cc4ff;
    --neon-text: linear-gradient(90deg, #6fd2ff 0%, #4db4ff 24%, #9c9bff 44%, #ff8fa6 58%, #ff9a6a 76%, #ffc062 100%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080b;
  --bg-2: #0c0e13;
  --bg-hero: linear-gradient(180deg, transparent 68%, var(--bg)),
             radial-gradient(1100px 700px at 76% 32%, rgba(77, 180, 255, .13), transparent 60%),
             radial-gradient(900px 640px at 18% 62%, rgba(255, 94, 138, .09), transparent 62%),
             linear-gradient(180deg, #090a0e 0%, #07080b 100%);
  --ink: #eef0f6;
  --ink-2: #c6cbd6;
  --muted: #9ba2b1;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(20, 22, 29, .56);
  --glass-2: rgba(24, 26, 34, .82);
  --glass-edge: rgba(255, 255, 255, .10);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 70px -30px rgba(0, 0, 0, .85);
  --link: #7cc4ff;
  --btn-bg: #f1f3f8;
  --btn-fg: #0a0b0f;
  --btn-glass: rgba(255, 255, 255, .06);
  --focus: #7cc4ff;
  --neon-text: linear-gradient(90deg, #6fd2ff 0%, #4db4ff 24%, #9c9bff 44%, #ff8fa6 58%, #ff9a6a 76%, #ffc062 100%);
}

/* ---------- language: both halves are in the HTML, only the active one shows ---------- */
html[data-lang="tr"] body [lang="en"],
html[data-lang="en"] body [lang="tr"],
html:not([data-lang]) body [lang="tr"] { display: none !important; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: rgba(77, 180, 255, .3); }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.mt16 { margin-top: 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.i { width: 1.15em; height: 1.15em; flex: none; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px;
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; font-weight: 600; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  transition: background-color .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid, .site-header:focus-within {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; border-radius: 12px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .5); }
.brand-name { font: 600 21px/1 var(--display); letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 15px; padding: 8px 12px; border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.nav a:hover { background: var(--btn-glass); color: var(--ink); }
.tools { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.seg {
  display: inline-flex; padding: 3px; border-radius: 999px; background: var(--btn-glass);
  border: 1px solid var(--line);
}
.seg button {
  border: 0; background: transparent; cursor: pointer; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); transition: background-color .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--glass-2); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--btn-glass); color: var(--ink-2); transition: background-color .2s, color .2s;
}
.icon-btn:hover { color: var(--ink); background: var(--glass-2); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .brand-name { font-size: 19px; }
}

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: var(--h);
  padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 15.5px; line-height: 1.15; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .55); }
.btn-primary:hover { box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6); }
.btn-glass {
  background: var(--glass); color: var(--ink); border-color: var(--line-2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-glass:hover { background: var(--glass-2); }
.btn-neon { position: relative; background: var(--glass-2); color: var(--ink); isolation: isolate; }
.btn-neon::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; z-index: -1; padding: 1.5px;
  background: var(--neon); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.btn-soon { background: transparent; color: var(--muted); border: 1px dashed var(--line-2); cursor: default; font-weight: 600; }
.btn-soon:hover, .btn-soon:active { transform: none; }
@media (max-width: 480px) { .btn { --h: 46px; padding: 0 16px; font-size: 15px; } }

/* ---------- section scaffolding ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; color: var(--muted);
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--neon); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { margin-top: 16px; font: 600 clamp(36px, 5.2vw, 64px)/1.04 var(--display); letter-spacing: -.02em; }
.section-head p.lead { margin-top: 18px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 20px); max-width: 600px; }

/* ---------- hero ---------- */
/* The copy column has a known width (--copy-w), so the 3D scene and its
   poster get their own box beside it (.hero-scene) and never run into the
   headline. hero3d.js frames the scene in that box; the poster is a still of
   the same scene in the same box, so the hand-over does not move. */
.hero {
  --copy-w: max(min(520px, 42vw), 452px);
  position: relative; min-height: max(640px, 100svh); display: flex; align-items: center;
  background: var(--bg-hero); overflow: clip; isolation: isolate;
}
.hero-stage, .hero-poster { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 72px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 72px), transparent); }
.hero-stage { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.hero.is-live .hero-canvas { opacity: 1; }
.hero-scene {
  position: absolute; z-index: -1; pointer-events: none;
  top: var(--header-h); bottom: 0; right: 0; left: calc(max(16px, (100% - 1200px) / 2) + var(--copy-w) + 32px);
}
.hero-poster { position: absolute; inset: 0; background: no-repeat center / contain; }
.hero.is-live .hero-poster { visibility: hidden; }
.hero-copy { position: relative; padding-top: calc(var(--header-h) + 40px); padding-bottom: 120px; }
.hero-copy > * { max-width: var(--copy-w); }
.hero-title {
  margin-top: 22px; font: 600 clamp(68px, 11.5vw, 176px)/.88 var(--display); letter-spacing: -.035em;
  display: flex; flex-wrap: wrap; column-gap: .22em;
}
/* beside the scene the name stands on two lines, the same at every width */
.hero-title .w1, .hero-title .w2 { flex-basis: 100%; }
.hero-title .w2 { background: var(--neon-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero-lead { margin-top: 28px; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: min(520px, var(--copy-w)); }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0; display: grid; place-items: center; gap: 8px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.scroll-cue i { width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px; position: relative; }
.scroll-cue i::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px;
  background: var(--neon); animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
/* Phones and upright tablets (the same test as hero3d.js): the text on top,
   the scene in the space under the buttons. */
@media (max-width: 760px), (max-aspect-ratio: 9/10) {
  .hero { flex-direction: column; align-items: stretch; }
  .hero-copy { padding-top: calc(var(--header-h) + 28px); padding-bottom: 0; }
  .hero-copy > * { max-width: 640px; }
  .hero-title .w1, .hero-title .w2 { flex-basis: auto; }
  .hero-lead { max-width: 560px; }
  .hero-scene { position: relative; inset: auto; flex: 1 0 auto; min-height: max(280px, 40svh); margin-top: 22px; }
  .scroll-cue { display: none; }
}
@media (max-width: 760px) {
  .hero-title { margin-top: 16px; }
  .hero-lead { margin-top: 20px; }
  .hero-cta { margin-top: 26px; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* The poster: stills of the scene per theme and language (tools/hero_poster.mjs),
   a sharp layer over a quarter-size layer of its big soft glows. */
.hero-poster { background-image: url("/assets/img/hero/hero-light-en.webp"), url("/assets/img/hero/hero-light-en-glow.webp"); }
html[data-lang="tr"] .hero-poster { background-image: url("/assets/img/hero/hero-light-tr.webp"), url("/assets/img/hero/hero-light-tr-glow.webp"); }
:root[data-theme="dark"] .hero-poster { background-image: url("/assets/img/hero/hero-dark-en.webp"), url("/assets/img/hero/hero-dark-en-glow.webp"); }
:root[data-theme="dark"][data-lang="tr"] .hero-poster { background-image: url("/assets/img/hero/hero-dark-tr.webp"), url("/assets/img/hero/hero-dark-tr-glow.webp"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-poster { background-image: url("/assets/img/hero/hero-dark-en.webp"), url("/assets/img/hero/hero-dark-en-glow.webp"); }
  :root:not([data-theme="light"])[data-lang="tr"] .hero-poster { background-image: url("/assets/img/hero/hero-dark-tr.webp"), url("/assets/img/hero/hero-dark-tr-glow.webp"); }
}
/* Without the live scene the poster breathes a little. */
@media (prefers-reduced-motion: no-preference) {
  .no3d .hero-poster { animation: poster-float 9s ease-in-out infinite alternate; }
}
@keyframes poster-float { from { transform: translateY(-6px); } to { transform: translateY(8px); } }

/* ---------- glass card base ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--glass-shadow);
}

/* ---------- apps ---------- */
.apps { background: linear-gradient(180deg, transparent, var(--bg-2) 70%, var(--bg)); }
.app-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.app-card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --accent: #4db4ff;
  position: relative; grid-column: span 12; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center; gap: clamp(20px, 4vw, 56px); padding: clamp(22px, 3.4vw, 44px);
  border-radius: 28px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), box-shadow .4s var(--ease);
  isolation: isolate; overflow: hidden;
}
.app-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: .9;
  background: radial-gradient(600px 380px at var(--mx) var(--my), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.app-card-rim {
  position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: .55;
  background: var(--neon); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity .4s var(--ease);
}
.app-card:hover .app-card-rim, .app-card:focus-within .app-card-rim { opacity: 1; }
.app-head { display: flex; align-items: center; gap: 18px; }
.app-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .6); flex: none; }
.app-name { font: 600 clamp(34px, 3.6vw, 46px)/1 var(--display); letter-spacing: -.02em; }
.app-tagline { margin-top: 8px; color: var(--ink-2); font-size: 16.5px; line-height: 1.45; }
.app-summary { margin-top: 22px; color: var(--muted); font-size: 16px; }
.app-platforms { list-style: none; margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.plat {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 10px; border-radius: 999px; font-size: 13.5px;
  color: var(--ink-2); background: var(--btn-glass); border: 1px solid var(--line);
}
.plat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9aa1b0; }
.plat-web::before { background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.plat-android::before { background: var(--gold); box-shadow: 0 0 0 3px rgba(251, 201, 58, .2); }
.plat b { font-weight: 700; color: var(--ink); }
.plat-sep { color: var(--muted); }
.app-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.app-visual { perspective: 1200px; }
.app-device {
  position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(160deg, #2a2c34, #121318 60%, #0c0d10);
  box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transform: rotateY(-14deg) rotateX(5deg) rotateZ(.5deg) translateZ(30px); transform-origin: 30% 50%;
  transition: transform .8s var(--ease);
}
.app-device::before {
  content: ""; position: absolute; inset: -1px; border-radius: 19px; padding: 1.5px; pointer-events: none;
  background: var(--neon); opacity: .8; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.app-device img { width: 100%; height: auto; border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; }
.app-card:hover .app-device { transform: rotateY(-6deg) rotateX(2deg) translateZ(40px); }
.app-more {
  grid-column: span 12; grid-template-columns: auto 1fr; padding: 26px clamp(22px, 3.4vw, 44px);
  background: transparent; border: 1.5px dashed var(--line-2); box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; gap: 22px; transform: none;
}
.app-more::after { display: none; }
.more-orb { position: relative; width: 56px; height: 56px; grid-row: span 2; }
.more-orb span { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--neon); top: 22px; left: 22px; animation: orb 3.6s var(--ease) infinite; }
.more-orb span:nth-child(2) { animation-delay: -1.2s; }
.more-orb span:nth-child(3) { animation-delay: -2.4s; }
@keyframes orb {
  0% { transform: rotate(0deg) translateX(18px) scale(.6); opacity: .4; }
  50% { transform: rotate(180deg) translateX(18px) scale(1); opacity: 1; }
  100% { transform: rotate(360deg) translateX(18px) scale(.6); opacity: .4; }
}
.more-title { font: 600 24px/1.2 var(--display); align-self: end; }
.more-text { color: var(--muted); font-size: 15.5px; align-self: start; max-width: 620px; }
/* The device in an app card swings into place as the card scrolls in
   (scroll-driven, no script; it animates rotate/translate/scale, so the
   hover tilt on transform still works). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .app-device { animation: device-in linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    @keyframes device-in {
      from { translate: 0 70px; rotate: y 22deg; scale: .9; opacity: .35; }
      to { translate: 0 0; rotate: y 0deg; scale: 1; opacity: 1; }
    }
  }
}
@media (max-width: 900px) {
  .app-card { grid-template-columns: 1fr; }
  .app-visual { order: -1; }
  .app-device { transform: rotateX(8deg) rotateY(0) translateZ(0); }
  .app-card:hover .app-device { transform: rotateX(4deg); }
}
@media (max-width: 480px) {
  .app-head { gap: 14px; }
  .app-icon { width: 68px; height: 68px; border-radius: 17px; }
  .app-actions .btn { flex: 1 1 100%; }
  .app-more { grid-template-columns: 1fr; }
  .more-orb { grid-row: auto; }
}

/* ---------- principles ---------- */
.principles .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle { padding: 30px 28px 32px; position: relative; overflow: hidden; }
.principle .p-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--btn-glass); border: 1px solid var(--line); color: var(--ink);
}
.principle .p-icon svg { width: 26px; height: 26px; }
.principle h3 { font: 600 25px/1.15 var(--display); letter-spacing: -.01em; }
.principle p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.principle::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 2px; background: var(--neon); opacity: .7; border-radius: 2px;
}
@media (max-width: 900px) { .principles .grid { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-card { padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.contact-card h2 { font: 600 clamp(34px, 4.4vw, 54px)/1.05 var(--display); letter-spacing: -.02em; }
.contact-card p { margin-top: 14px; color: var(--ink-2); font-size: 18px; max-width: 520px; }
.mail-big {
  justify-self: end; display: inline-flex; align-items: center; gap: 12px; padding: 18px 24px; border-radius: 20px;
  font-weight: 650; font-size: clamp(16px, 1.8vw, 21px); color: var(--ink); text-decoration: none; word-break: break-all;
  background: var(--glass-2); border: 1px solid var(--line-2); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.mail-big:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .5); }
.mail-big .i { width: 24px; height: 24px; }
@media (max-width: 900px) { .contact-card { grid-template-columns: 1fr; } .mail-big { justify-self: start; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.site-footer .brand { margin: 0 0 14px; }
.site-footer h2 { font: 700 12.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .fine { margin-top: 10px; max-width: 360px; }
.site-footer .copy { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* ---------- reveal on scroll (only when JS runs and motion is allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 40px) 16px 60px; background: var(--bg-hero); }
.nf-code { font: 600 clamp(110px, 22vw, 240px)/.9 var(--display); letter-spacing: -.04em; background: var(--neon-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf h1 { margin-top: 18px; font: 600 clamp(28px, 4vw, 44px)/1.1 var(--display); }
.nf p { margin: 14px auto 0; color: var(--ink-2); max-width: 460px; }
.nf .nf-code { margin: 0; max-width: none; color: transparent; }
.nf .row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.nf .nf-legal { margin-top: 28px; font-size: 14.5px; color: var(--muted); }

/* ---------- page to page: a soft cross-fade, and an app's icon flies from its card to its page ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; }
  ::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
}
[data-vt] { view-transition-name: attr(data-vt type(<custom-ident>), none); }
.nf .nf-legal a { color: var(--muted); }

/* ---------- documents (site privacy) ---------- */
.doc { padding: calc(var(--header-h) + 52px) 0 clamp(64px, 9vw, 110px); }
.doc-wrap { max-width: 760px; }
.doc h1 { margin-top: 18px; font: 600 clamp(40px, 6vw, 64px)/1.04 var(--display); letter-spacing: -.02em; }
.doc-date { margin-top: 12px; color: var(--muted); font-size: 15px; }
.doc-lead { margin-top: 22px; font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); }
.doc h2 { margin-top: 44px; font: 600 26px/1.2 var(--display); letter-spacing: -.01em; }
.doc h2 + p, .doc h2 + ul { margin-top: 12px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.2em; display: grid; gap: 10px; }
.doc li::marker { color: var(--muted); }
.doc code { font-size: .88em; padding: 1px 6px; border-radius: 6px; background: var(--btn-glass); border: 1px solid var(--line); }
