/* The website: the landing page and the login pages. Grape's own ground and type (Poppins, from the app), one accent -
   grape violet - used only as light. */

@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 400; src: url("/grape/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 500; src: url("/grape/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 600; src: url("/grape/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 700; src: url("/grape/fonts/poppins-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #0e0e0e;
  --raised: #151515;
  --raised-2: #1b1b1b;
  --line: #222222;
  --white: #f3f3f3;
  --soft: #c9c9c9;
  --muted: #8f8f8f;
  --quiet: #616161;
  --grape: #8b6cff;
  --good: #46d389;
  --bad: #ef6b70;
  --measure: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font: 15px/1.6 "Poppins", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #8a8a8a; outline-offset: 3px; border-radius: 6px; }
.ic { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

/* buttons: a light one for the main thing, a quiet one beside it */
.btn { height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 22px; border: 0; border-radius: 12px; font: 600 14.5px/1 "Poppins", sans-serif; text-decoration: none; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease; }
.btn.main { background: #ececec; color: #111; }
.btn.main:hover { background: #fff; }
.btn.quiet { background: var(--raised-2); color: var(--white); }
.btn.quiet:hover { background: #242424; }
.btn:active { transform: scale(0.985); }
.btn .ic { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* ------------------------------------------------------------------ the bar on top */

.nav { position: sticky; top: 0; z-index: 10; background: rgba(14, 14, 14, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
.nav-in { max-width: var(--measure); margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 28px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.3px; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 7px 12px; border-radius: 9px; color: var(--soft); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.nav-links a:hover { background: var(--raised); color: #fff; }
.nav .grow { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.who .face { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--raised-2); font-size: 12px; }
.who .face img { width: 100%; height: 100%; object-fit: cover; }
.who a.out { color: var(--muted); font-weight: 500; font-size: 12.5px; text-decoration: none; }
.who a.out:hover { color: #fff; }
.login-link { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 10px; background: var(--raised-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.login-link:hover { background: #242424; }
.login-link .ic { width: 16px; height: 16px; }

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

.hero { position: relative; overflow: hidden; padding: 96px 24px 0; text-align: center; }
/* the one bit of colour: grape light behind the window, as if from the screen */
.hero::before { content: ""; position: absolute; left: 50%; top: 330px; width: 1100px; height: 640px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(139, 108, 255, 0.34), rgba(139, 108, 255, 0.08) 55%, transparent 75%); pointer-events: none; }
.hero h1 { position: relative; margin: 0 auto; max-width: 880px; font-size: clamp(40px, 6.2vw, 70px); line-height: 1.06; font-weight: 700; letter-spacing: -0.03em; }
.hero p.lead { position: relative; margin: 22px auto 0; max-width: 600px; color: var(--soft); font-size: 17px; line-height: 1.65; }
.hero .ctas { position: relative; display: flex; justify-content: center; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.hero .small { position: relative; margin: 16px 0 0; color: var(--quiet); font-size: 12.5px; }
.shot { position: relative; max-width: 1060px; margin: 64px auto 0; border-radius: 16px 16px 0 0; overflow: hidden; border: 1px solid #262626; border-bottom: 0; box-shadow: 0 -10px 80px rgba(139, 108, 255, 0.16), 0 30px 80px rgba(0, 0, 0, 0.6); }
.shot img { width: 100%; }
.hero-fade { position: relative; height: 1px; background: linear-gradient(90deg, transparent, #2a2a2a 20%, #2a2a2a 80%, transparent); }

/* ------------------------------------------------------------------ what Grape does */

.features { max-width: var(--measure); margin: 0 auto; padding: 72px 24px 24px; }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; padding: 56px 0; }
.feature.flip { grid-template-columns: 1fr 1.15fr; }
.feature.flip .feature-shot { order: 2; }
.feature-shot { border-radius: 16px; overflow: hidden; border: 1px solid #242424; background: var(--raised); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); }
.feature h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; }
.feature p { margin: 18px 0 0; color: var(--soft); font-size: 15.5px; line-height: 1.7; max-width: 46ch; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 26px; max-width: 420px; }
.chip { height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 11px; background: var(--raised); font-size: 13px; font-weight: 600; color: #e6e6e6; }
.chip .ic { width: 15px; height: 15px; color: #a9a9a9; }

/* ------------------------------------------------------------------ plans */

.plans { max-width: var(--measure); margin: 0 auto; padding: 80px 24px 40px; text-align: center; }
.plans h2 { margin: 0; font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -0.03em; line-height: 1.08; }
.perks { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 26px auto 0; padding: 0; max-width: 920px; }
.perks li { display: flex; align-items: center; gap: 8px; color: #dcdcdc; font-size: 13.5px; font-weight: 500; }
.perks .ic { width: 15px; height: 15px; color: #a9a9a9; }
.plans .lead { margin: 16px auto 0; max-width: 560px; color: var(--soft); font-size: 16px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 48px; text-align: left; }
.plan { display: flex; flex-direction: column; padding: 24px; border-radius: 18px; background: var(--raised); border: 1px solid #1f1f1f; }
.plan.pick { border-color: rgba(139, 108, 255, 0.55); box-shadow: 0 0 0 1px rgba(139, 108, 255, 0.25), 0 20px 60px rgba(139, 108, 255, 0.12); }
.plan .name { font-size: 14px; font-weight: 600; color: var(--soft); }
.plan .price { margin-top: 10px; font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.plan .length { margin-top: 4px; color: var(--muted); font-size: 13px; }
.plan ul { list-style: none; margin: 20px 0 22px; padding: 0; display: grid; gap: 9px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #dedede; }
.plan li .ic { width: 15px; height: 15px; margin-top: 3px; color: var(--good); }
.plan .btn { margin-top: 22px; width: 100%; height: 42px; font-size: 13.5px; }
.plans .note { margin: 22px 0 0; color: var(--quiet); font-size: 12.5px; }

/* ------------------------------------------------------------------ the last call, and the footer */

.cta { max-width: var(--measure); margin: 40px auto 0; padding: 72px 24px; text-align: center; border-top: 1px solid var(--line); }
.cta h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.025em; }
.cta p { margin: 12px 0 28px; color: var(--soft); }
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: var(--measure); margin: 0 auto; padding: 48px 24px 36px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot .about p { margin: 14px 0 0; max-width: 34ch; color: var(--muted); font-size: 13.5px; }
.foot h3 { margin: 4px 0 12px; font-size: 13px; font-weight: 600; color: var(--soft); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot li a { color: var(--muted); font-size: 13.5px; text-decoration: none; }
.foot li a:hover { color: #fff; }
.foot-base { max-width: var(--measure); margin: 0 auto; padding: 18px 24px 40px; display: flex; justify-content: space-between; color: var(--quiet); font-size: 12.5px; }

/* ------------------------------------------------------------------ the login pages (centred, like the app's welcome screen) */

.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.center-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.center-box > img { width: 60px; height: 60px; margin-bottom: 4px; }
.center-box h1 { margin: 0; font-size: 25px; letter-spacing: -0.5px; line-height: 1.2; }
.center-box p { margin: 0; color: var(--muted); font-size: 13.5px; }
.center-box .btn { width: 100%; }
.center-box .account { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--raised); font-weight: 600; }
.center-box .account .face { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #2a2a2a; font-size: 12px; }
.center-box .account .face img { width: 100%; height: 100%; object-fit: cover; }
.code { display: inline-flex; gap: 6px; }
.code b { width: 38px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: var(--raised); font: 700 20px/1 Consolas, monospace; }
.center-box form { width: 100%; margin: 0; }
.text-link { color: #cfcfcf; font-size: 13px; font-weight: 600; text-underline-offset: 3px; text-decoration-color: #555; }
.text-link:hover { color: #fff; text-decoration-color: #aaa; }
button.text-link { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-decoration-line: underline; }
.center-box .bad { color: var(--bad); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .feature.flip .feature-shot { order: 0; }
  .plan-grid { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .chips { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* a live Grape window (LiveWindow.js): the app's own markup, scaled to the box */
.live { position: relative; overflow: hidden; background: #0e0e0e; }
.live iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
