/* Hex Client: landing and purchase pages. Warm near-black, one red accent. */
:root {
  --bg: #110f0f;
  --surface: #171313;
  --surface-2: #1d1818;
  --line: #2b2424;
  --line-soft: #221c1c;
  --text: #f2eded;
  --muted: #a49a9a;
  --faint: #6f6666;
  --red: #e5383b;
  --red-soft: #ff6b6e;
  --red-tint: rgba(229, 56, 59, .12);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(1180px, 100% - 48px); margin: 0 auto; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(17, 15, 15, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap { display: flex; align-items: center; gap: 36px; height: 64px; }
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.3px; text-decoration: none; }
.logo b { color: var(--red); font-weight: 800; }
.logo span { color: var(--faint); font-weight: 500; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.topbar .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* Buttons: tinted outline like the reference, solid for the main action */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: var(--radius);
  font: 600 14px/1 Inter, sans-serif; text-decoration: none; cursor: pointer;
  border: 1px solid rgba(229, 56, 59, .55);
  background: var(--red-tint); color: var(--red-soft);
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: rgba(229, 56, 59, .2); border-color: var(--red); color: #fff; }
.btn svg { width: 14px; height: 14px; }
.btn--solid { background: var(--red); border-color: var(--red); color: #1a0606; }
.btn--solid:hover { background: var(--red-soft); border-color: var(--red-soft); color: #1a0606; }
.btn--quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.btn--quiet:hover { background: var(--surface); border-color: #3a3131; color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 120px 0 0; }
.hero::after { /* red glow on the floor of the hero */
  content: ""; position: absolute; left: 50%; bottom: 120px; width: 900px; height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(229, 56, 59, .22), transparent);
  pointer-events: none;
}
.hero .shape { position: absolute; left: 50%; top: 40px; width: 940px; transform: translateX(-50%); opacity: .5; pointer-events: none; }
.dots { position: absolute; width: 130px; height: 230px; pointer-events: none;
  background-image: radial-gradient(#4a3f3f 1.2px, transparent 1.4px); background-size: 14px 14px; }
.dots i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 14px 4px rgba(229, 56, 59, .55); }
.dots--left { left: 1.5%; top: 330px; }
.dots--right { right: 7%; top: 90px; height: 140px; }

.hero h1 {
  position: relative; margin: 0; font-weight: 500; letter-spacing: -.035em;
  font-size: clamp(46px, 8vw, 100px); line-height: 1.02;
  background: linear-gradient(#fff, rgba(255, 255, 255, .5));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .line { display: block; }
.hero h1 .line + .line { padding-left: clamp(40px, 16vw, 230px); }
.hero .lede { position: relative; max-width: 560px; margin: 28px 0 0 clamp(40px, 16vw, 230px); color: var(--muted); font-size: 17px; }
.hero .cta { position: relative; display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0 0 clamp(40px, 16vw, 230px); }
.hero .note { position: relative; margin: 14px 0 0 clamp(40px, 16vw, 230px); color: var(--faint); font-size: 13px; }

.shot { position: relative; z-index: 1; margin: 72px auto 0; width: min(760px, 100%); }
.shot img { width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 6px #151111; }
.shot figcaption { margin-top: 14px; text-align: center; color: var(--faint); font-size: 13px; }

/* Sections */
section { padding: 110px 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px 48px; align-items: end; margin-bottom: 48px; }
.section-head h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.section-head p { margin: 0; color: var(--muted); }
.section-head p a { color: var(--red-soft); }

/* Features: screenshot-free list split into two columns with hairlines */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.feature { padding: 30px 28px 34px 0; border-bottom: 1px solid var(--line); }
.feature:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.feature:not(:nth-child(3n + 1)) { padding-left: 28px; }
.feature .num { font: 500 12px/1 ui-monospace, Menlo, monospace; color: var(--red); }
.feature h3 { margin: 14px 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.plan--featured { border-color: rgba(229, 56, 59, .6); background: linear-gradient(180deg, rgba(229, 56, 59, .09), transparent 55%), var(--surface); }
.plan .tag { position: absolute; top: 20px; right: 20px; padding: 4px 9px; border: 1px solid rgba(229, 56, 59, .6); border-radius: 6px; color: var(--red-soft); font: 600 11px/1 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.plan h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--muted); }
.plan .price { margin: 18px 0 4px; font-size: 52px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.plan .price sup { font-size: 22px; vertical-align: 22px; margin-right: 2px; color: var(--muted); }
.plan .price small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--faint); }
.plan .per { color: var(--faint); font-size: 14px; margin: 0 0 22px; }
.plan ul { list-style: none; margin: 0 0 28px; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 15px; color: #d6cfcf; }
.plan li { display: flex; gap: 10px; align-items: baseline; }
.plan li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--red); transform: translateY(-2px); }
.plan .btn { margin-top: auto; justify-content: center; }

/* Reviews */
.reviews { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.review { margin: 0; padding: 28px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.review blockquote { margin: 0 0 24px; font-size: 16px; color: #ddd5d5; }
.review:first-child blockquote { font-size: 20px; line-height: 1.5; color: var(--text); }
.review figcaption { margin-top: auto; color: var(--muted); font-size: 14px; }
.review figcaption b { color: var(--text); font-weight: 600; }

/* Contact band */
.band { padding: 0 0 110px; }
.band .inner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 44px 48px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(600px 220px at 85% 120%, rgba(229, 56, 59, .25), transparent), var(--surface); }
.band h2 { margin: 0 0 6px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.band p { margin: 0; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--line-soft); padding: 28px 0 40px; color: var(--faint); font-size: 14px; }
.footer .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.footer nav { margin-left: auto; display: flex; gap: 22px; }
.footer a { text-decoration: none; color: var(--muted); }
.footer a:hover { color: var(--text); }

/* Purchase page */
.shop-head { position: relative; overflow: hidden; padding: 90px 0 40px; }
.shop-head h1 { margin: 0; font-size: clamp(40px, 6vw, 72px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05;
  background: linear-gradient(#fff, rgba(255, 255, 255, .55)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shop-head p { margin: 16px 0 0; max-width: 560px; color: var(--muted); }
.tabs { display: flex; gap: 6px 26px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.tabs button { background: none; border: 0; padding: 0 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--faint); font: 500 15px/1 Inter, sans-serif; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--red); }
.tabs button span { margin-left: 6px; font-size: 12px; color: var(--red-soft); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding-bottom: 110px; }
.product { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.product:hover { border-color: rgba(229, 56, 59, .55); transform: translateY(-2px); }
.product[hidden] { display: none; }
.product .art { aspect-ratio: 16 / 10; background: #0d0b0b; border-bottom: 1px solid var(--line); }
.product .art img { width: 100%; height: 100%; object-fit: cover; }
.product .body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.product .kind { font-size: 12px; color: var(--faint); }
.product .title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.product .row { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.product .cost { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.product .row .go { color: var(--red-soft); font-size: 14px; font-weight: 600; }

/* Dialogs */
.dialog { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 6, 6, .78); }
.dialog.open { display: flex; }
.dialog .panel { position: relative; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.dialog .close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.dialog .close:hover { color: var(--text); }
.dialog .panel > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--line); }
.dialog .content { padding: 24px 26px 26px; }
.dialog h2 { margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.dialog .content > p { margin: 0 0 18px; color: var(--muted); word-break: break-word; }
.dialog .buy { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.dialog .buy strong { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.dialog--tos .panel { width: min(760px, 100%); }
.tos { padding: 30px 32px 0; color: #cfc7c7; font-size: 14px; }
.tos h2 { font-size: 24px; margin-bottom: 4px; }
.tos h3 { margin: 22px 0 8px; font-size: 15px; color: var(--text); }
.tos p { margin: 0 0 10px; }
.tos-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: 16px 32px; background: var(--surface); border-top: 1px solid var(--line); }

/* Small screens */
@media (max-width: 900px) {
  .nav { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature, .feature:not(:nth-child(3n + 1)) { padding: 26px 22px 28px 0; }
  .feature:not(:nth-child(3n)) { border-right: 0; }
  .feature:nth-child(odd) { border-right: 1px solid var(--line); }
  .feature:nth-child(even) { padding-left: 22px; }
  .plans, .reviews { grid-template-columns: 1fr; }
  .dots { display: none; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .topbar .actions .btn--quiet { display: none; }
  .hero { padding-top: 72px; }
  .hero h1 .line + .line, .hero .lede, .hero .cta, .hero .note { padding-left: 0; margin-left: 0; }
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(even) { padding: 24px 0; border-right: 0 !important; }
  section { padding: 80px 0; }
  .band .inner { padding: 32px 24px; }
  .footer nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
