:root {
  color-scheme: light dark;
  --bg: #f5f4fb;
  --surface: #ffffff;
  --text: #15173a;
  --muted: #4b4e70;
  --line: #e0dff0;
  --link: #6b2fc0;
  --navy: #0d0f2e;
  --navy-2: #1b1f5a;
  --orange: #f7a24b;
  --pink: #e2517f;
  --violet: #9b4bd1;
  --glass: linear-gradient(135deg, var(--orange) 0%, var(--pink) 52%, var(--violet) 100%);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d28;
    --surface: #151841;
    --text: #eceaf6;
    --muted: #a9abca;
    --line: #262a5e;
    --link: #f29bc4;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); color: var(--text); padding: 8px 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 720px; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.12; }
.grad { background: var(--glass); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- header ---------- */

header.site {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 30px; height: 30px; }
nav a { margin-left: 20px; color: var(--muted); text-decoration: none; font-weight: 500; }
nav a:hover, nav a[aria-current] { color: var(--text); }
@media (max-width: 480px) { nav a { margin-left: 14px; } nav a[href="#features"] { display: none; } }

/* ---------- hero (dark in both themes) ---------- */

.hero {
  position: relative; overflow: hidden;
  color: #f1effa;
  background:
    radial-gradient(60% 50% at 20% 20%, rgb(226 81 127 / 0.28), transparent 70%),
    radial-gradient(50% 45% at 85% 30%, rgb(155 75 209 / 0.32), transparent 70%),
    radial-gradient(45% 40% at 50% 100%, rgb(247 162 75 / 0.22), transparent 70%),
    linear-gradient(180deg, var(--navy-2), var(--navy));
  padding: 56px 0 72px;
}
.hero .wrap { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; text-align: center; }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr 1.1fr; text-align: left; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #c9c7e6; margin: 0; }
.eyebrow img { width: 28px; height: 28px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin: 14px 0 16px; }
.hero .lede { font-size: 1.2rem; color: #c9c7e6; margin: 0 0 28px; max-width: 30em; }
@media (max-width: 899px) { .hero .lede { margin-inline: auto; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 899px) { .cta { justify-content: center; } }

.badge-placeholder {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  border: 1px dashed rgb(255 255 255 / 0.35);
  color: #e6e4f5; font-weight: 600;
}
.btn-ghost {
  padding: 12px 20px; border-radius: 12px; text-decoration: none; font-weight: 600;
  color: #f1effa; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.16);
}
.btn-ghost:hover { background: rgb(255 255 255 / 0.14); }

/* ---------- the folding laptop (pure CSS) ---------- */

/* One animated hinge angle drives everything: the lid, its shading, the shadow on the deck,
   the readout and the glass. --p is fold progress as the app computes it: the fold engages
   at 90° and completes over 35° of travel (the app's Travel setting). */
@property --a { syntax: "<number>"; inherits: true; initial-value: 108; }
@property --deg { syntax: "<integer>"; inherits: false; initial-value: 108; }

.stage {
  --w: min(500px, 84vw);
  --lh: calc(var(--w) / 1.45);   /* lid height */
  --th: calc(var(--w) * 0.011);  /* lid thickness */
  --sh: calc(var(--w) * 0.623);  /* height of the visible screen */
  --t: 9s;
  --alu-1: #e4e5ea;
  --alu-2: #c3c6ce;
  --lid: calc((var(--a) - 90) * 1deg);
  --p: clamp(0, (90 - var(--a)) / 35, 1);
  --shade: clamp(0, (108 - var(--a)) / 53, 1);
  display: grid; justify-items: center; gap: 24px;
  perspective: 1400px; perspective-origin: 50% 15%;
  padding-top: 12px;
  animation: hinge var(--t) ease-in-out infinite;
}
.laptop {
  position: relative; width: var(--w); aspect-ratio: 1.45;
  transform-style: preserve-3d; transform: rotateX(-16deg);
  margin-bottom: calc(var(--w) * 0.44);
}

/* lid: thin aluminium rim around a black glass front */
.lid {
  position: absolute; inset: 0;
  transform-origin: 50% 100%;
  transform: rotateX(var(--lid));
  padding: 0.55%;
  border-radius: 3.4% 3.4% 0.8% 0.8% / 5% 5% 1.2% 1.2%;
  /* the rim turns toward the deck as the lid closes and catches less light */
  background: linear-gradient(180deg,
    color-mix(in srgb, #d9dbe1, #5d616b calc(var(--shade) * 55%)),
    color-mix(in srgb, #9da1ab, #3c3f47 calc(var(--shade) * 55%)));
  /* closes the hairline seam Chrome leaves where the lid meets its top edge */
  box-shadow: 0 -1.5px 0 color-mix(in srgb, #eceef2, #9a9ea8 calc(var(--shade) * 40%));
}
/* the lid's top edge: an aluminium strip as deep as the lid is thick, folded back from the top
   of the front face. A sibling of the lid rather than a child, so no preserve-3d is nested. */
.lid-top {
  position: absolute; left: 2.2%; right: 2.2%; top: 0; height: var(--th);
  transform-origin: 50% var(--lh);
  transform: rotateX(var(--lid)) translateY(calc(var(--lh) * -1)) rotateX(-90deg) translateY(var(--lh));
  border-radius: 2px;
  background: linear-gradient(180deg,
    color-mix(in srgb, #eceef2, #9a9ea8 calc(var(--shade) * 40%)),
    color-mix(in srgb, #b3b6bf, #767a84 calc(var(--shade) * 40%)));
}
.frame {
  position: relative; height: 100%;
  padding: 2.4% 2% 3.2%;
  border-radius: 3% 3% 0.6% 0.6% / 4.4% 4.4% 1% 1%;
  background: #050506;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.6) inset;
}
.notch {
  position: absolute; left: 50%; top: 0; width: 13%; height: 4.6%;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px; background: #050506;
}
.notch::after { /* camera */
  content: ""; position: absolute; left: 50%; top: 32%; width: 5px; height: 5px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3b4a6b, #0c0f18 70%);
}
/* The screen. What Tilter draws is a pane hanging from the bottom edge of the display: it
   drops back one screen height and leans away by 35°, seen from an eye 3.2 screen heights
   away and low, at 12% of the height (GlassRenderer's defaults). Around it, black. */
.bezel {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 7px 7px 1px 1px;
  perspective: calc(var(--sh) * 3.2); perspective-origin: 50% 88%;
  background: #000;
}
.bezel::after { /* glare */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.10) 0%, rgb(255 255 255 / 0.03) 35%, transparent 36%);
}
.pane {
  position: absolute; inset: 0;
  transform-origin: 50% 100%;
  transform: translateZ(calc(var(--p) * var(--sh) * -1)) rotateX(calc(var(--p) * 35deg));
  border-radius: calc(var(--p) * 6px) calc(var(--p) * 6px) 0 0;
  /* the top edge frosts with the picture and dissolves into the dark */
  -webkit-mask-image: linear-gradient(to top, #000 calc(100% - var(--p) * 14%), transparent);
  mask-image: linear-gradient(to top, #000 calc(100% - var(--p) * 14%), transparent);
}
.pane::after { /* grain belongs to the glass, so it travels with the pane */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  opacity: calc(var(--p) * 0.55);
  background: url("/assets/grain.svg");
  mix-blend-mode: overlay;
}
.scene {
  position: absolute; inset: 0; border-radius: inherit;
  background:
    radial-gradient(40% 40% at 22% 82%, rgb(247 162 75 / 0.95), transparent 70%),
    radial-gradient(45% 45% at 82% 70%, rgb(155 75 209 / 0.95), transparent 70%),
    linear-gradient(135deg, #f4bdd4 0%, #e2517f 55%, #a24bd0 100%);
}
/* Frost grows with the gap between pane and screen: none at the hinge, most at the top. A
   blurred, slightly milky copy of the picture fades in over the sharp one from the bottom up;
   its blur spills past the top edge, so the pane dissolves into the black. */
.scene.frost {
  filter: blur(18px) brightness(1.12) saturate(0.8);
  opacity: var(--p);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 55%);
  mask-image: linear-gradient(to top, transparent 0%, #000 55%);
}
.menubar { position: absolute; left: 0; right: 0; top: 0; height: 4.2%; background: rgb(255 255 255 / 0.28); backdrop-filter: blur(6px); }
.win {
  position: absolute; border-radius: 6px; overflow: hidden;
  background: rgb(255 255 255 / 0.62);
  box-shadow: 0 10px 28px rgb(40 10 60 / 0.3), 0 0 0 0.5px rgb(0 0 0 / 0.15);
}
.win::before { /* title bar with window buttons */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 13%;
  background:
    radial-gradient(ellipse 1.6% 18% at 5% 50%, #ff5f57 90%, transparent 100%),
    radial-gradient(ellipse 1.6% 18% at 9.5% 50%, #febc2e 90%, transparent 100%),
    radial-gradient(ellipse 1.6% 18% at 14% 50%, #28c840 90%, transparent 100%),
    rgb(255 255 255 / 0.7);
}
.w1 { left: 8%; top: 14%; width: 50%; height: 54%; }
.w2 { left: 45%; top: 32%; width: 44%; height: 46%; background: rgb(255 255 255 / 0.45); }
.dock {
  position: absolute; left: 28%; right: 28%; bottom: 3%; height: 7.5%;
  border-radius: 8px; background: rgb(255 255 255 / 0.35);
  box-shadow: 0 0 0 0.5px rgb(255 255 255 / 0.5) inset;
}

/* base: aluminium deck, keyboard, trackpad, front edge */
.base {
  position: absolute; top: 100%; left: 0; width: 100%; height: 100%;
  transform-origin: 50% 0; transform: rotateX(90deg);
  border-radius: 0.8% 0.8% 3.4% 3.4% / 1.2% 1.2% 5% 5%;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.5), transparent 8%),
    linear-gradient(180deg, var(--alu-1), var(--alu-2));
  /* drawn in the base's own plane, so it lands on the "table" without a separate 3D layer */
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.5) inset, 0 24px 60px -6px rgb(0 0 0 / 0.65);
}
.base::after { /* the closing lid shades the deck behind the keyboard */
  content: ""; position: absolute; left: 0; right: 0; top: 0; pointer-events: none;
  height: calc(8% + var(--shade) * 32%);
  border-radius: inherit;
  background: linear-gradient(180deg, rgb(10 10 20 / 0.6), transparent);
  opacity: calc(0.15 + var(--shade) * 0.85);
}
.base > * { position: absolute; }
.hinge { left: 12%; right: 12%; top: 0; height: 2.6%; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, #0b0b0d, #2a2b30); }
.grille {
  top: 7%; height: 44%; width: 7.5%;
  background: radial-gradient(circle, rgb(40 42 55 / 0.55) 0.7px, transparent 1.1px) 0 0 / 4px 4px;
}
.gl { left: 3.2%; }
.gr { right: 3.2%; }
.kbd {
  left: 12.5%; right: 12.5%; top: 7%; height: 44%;
  display: grid; grid-template-rows: 0.62fr repeat(5, 1fr); gap: 2.4%;
  padding: 1.2%; border-radius: 6px;
  background: linear-gradient(180deg, #a9acb6, #b9bcc5);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25) inset;
}
.row { display: flex; gap: 0.9%; }
.k {
  flex: 1 1 0; border-radius: 3px;
  background: linear-gradient(180deg, #1d1e22, #111214);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset, 0 1px 1px rgb(0 0 0 / 0.5);
}
.k.w12 { flex-grow: 1.25; }
.k.w15 { flex-grow: 1.5; }
.k.w16 { flex-grow: 1.6; }
.k.w19 { flex-grow: 1.9; }
.k.w25 { flex-grow: 2.45; }
.k.space { flex-grow: 5.3; }
.k.tid { background: radial-gradient(circle, #2b2c31 45%, #111214 48%); }
.arrows { flex: 3 1 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 0 4%; }
.arrows .l { grid-area: 2 / 1; }
.arrows .u { grid-area: 1 / 2; border-radius: 3px 3px 1px 1px; }
.arrows .d { grid-area: 2 / 2; border-radius: 1px 1px 3px 3px; }
.arrows .r { grid-area: 2 / 3; }
.pad {
  left: 27%; right: 27%; top: 55%; bottom: 6.5%; border-radius: 8px;
  background: linear-gradient(180deg, #d7d9df, #c9ccd3);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.07) inset, 0 1px 0 rgb(255 255 255 / 0.6);
}
.thumb { left: 43%; right: 43%; bottom: 0; height: 1.6%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #aeb1ba, #c3c6ce); }
.edge { /* front thickness: a flat strip hanging below the hinge line, pushed forward to the base's near edge */
  position: absolute; left: 0; right: 0; top: 100%; height: 3.2%;
  transform: translateZ(calc(var(--w) / 1.45));
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #b7bac3, #7f838e);
}

.readout {
  font: 600 0.85rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em; text-transform: uppercase; color: #c9c7e6;
  padding: 8px 14px; border-radius: 999px;
  background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.12);
}
.readout .num { --deg: calc(var(--a)); counter-reset: d var(--deg); color: #fff; }
.readout .num::after { content: counter(d) "°"; }

@keyframes hinge {
  0%, 12%   { --a: 108; }
  46%, 60%  { --a: 55; }
  90%, 100% { --a: 108; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage { animation: none; --a: 70; }
}

/* ---------- sections ---------- */

section.block { padding: 72px 0 0; }
.kicker { margin: 0 0 8px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink); }
section.block h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 0 16px; }
.intro { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin: 0 0 32px; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p, .card li { color: var(--muted); }
.card p { margin: 0; }
.card .dot { width: 36px; height: 36px; border-radius: 10px; background: var(--glass); margin-bottom: 16px; box-shadow: 0 8px 24px rgb(226 81 127 / 0.35); }
.card .dot.b { background: linear-gradient(135deg, var(--pink), var(--violet)); }
.card .dot.c { background: linear-gradient(135deg, var(--violet), var(--navy-2)); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 24px 0 0; }
.chips li {
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  background: var(--surface); border: 1px solid var(--line);
}

.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.plan ul { margin: 12px 0 0; padding-left: 20px; }
.plan.pro { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glass) border-box; }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--pink) 15%, transparent); color: var(--pink); margin-bottom: 10px; }

.privacy-band {
  margin-top: 72px; border-radius: 24px; padding: 40px 28px; color: #f1effa;
  background:
    radial-gradient(60% 80% at 100% 0%, rgb(155 75 209 / 0.45), transparent 70%),
    linear-gradient(135deg, var(--navy-2), var(--navy));
}
.privacy-band h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.privacy-band p { color: #c9c7e6; max-width: 44em; margin: 0 0 16px; }
.privacy-band a { color: #f7c1da; }

.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 0 20px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--pink); font-size: 1.3rem; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }
kbd { font: 600 0.85em ui-monospace, Menlo, monospace; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg); }

/* ---------- privacy page ---------- */

.doc { padding: 56px 16px 0; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: 0 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 32px; }
.doc .summary { font-size: 1.2rem; padding: 20px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--pink); }

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

footer.site { margin-top: 96px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
