/* ThreeBee site — shared styles.
 * Colours come from the Repeatit app (src/theme/colors.ts) and the ThreeBee
 * brand sheet (black, white, off-white, graphite, honey yellow).
 */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #6e6e73;
  --line: #ececec;
  --rule: #e2e3e7;          /* the frame lines */
  --ink: #1c1c1e;           /* filled buttons and the active tab */
  --on-ink: #ffffff;

  /* ThreeBee */
  --honey: #f5b915;
  --graphite: #1b1b1b;

  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(16, 17, 20, 0.05), 0 6px 18px rgba(16, 17, 20, 0.06);
  --max: 1120px;
  --frame: min(var(--max), calc(100% - 16px));   /* where the vertical rails sit */
  --gutter: 16px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;   /* the site is light-only */
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --frame: min(var(--max), calc(100% - 48px)); }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }

.container {
  width: var(--frame);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Frame: full-height rails + full-width rules ---------- */

.shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

/* The two vertical lines that run the full height of the page */
.shell::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: var(--frame);
  transform: translateX(-50%);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  pointer-events: none;
  z-index: 0;
}
.shell > * { position: relative; z-index: 1; }

/* ---------- Top bar ---------- */

.topbar { border-bottom: 1px solid var(--rule); }
.shell > .topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 68px;
  gap: 12px;
}

.brand {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand-mark { height: 28px; width: auto; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }

.tabs {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tab {
  text-decoration: none;
  font-size: 15px; font-weight: 600; color: var(--muted);
  padding: 7px 16px; border-radius: 999px;
  transition: color 0.15s, background-color 0.15s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { background: var(--ink); color: var(--on-ink); }

@media (max-width: 560px) {
  .nav { grid-template-columns: auto 1fr; height: 60px; }
  .nav-spacer { display: none; }
  .tabs { justify-self: end; }
  .tab { font-size: 14px; padding: 6px 12px; }
}
@media (max-width: 400px) {
  .brand-name { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 13px 22px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--on-ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Repeatit: landing ---------- */

/* The hero fills the first screen below the top bar; the Discover sections follow */
.stage {
  display: grid; place-items: center;
  padding: 40px 0;
  min-height: calc(100vh - 69px);
  min-height: calc(100svh - 69px);
}
.stage-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

.stage h1 {
  font-size: clamp(42px, 8.4vw, 92px);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1.02;
  margin: 0 0 26px;
}
.stage h1 .line { display: block; white-space: nowrap; }

/* Repeatit icon + wordmark above the headline */
.lockup {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 30px;
}
.lockup-icon {
  display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 13px;
  background: var(--ink);
}
.lockup-icon img { width: 58%; height: auto; filter: invert(1); }
.lockup-wordmark { height: 40px; width: auto; margin-top: 6px; }
@media (max-width: 480px) {
  .lockup { gap: 10px; margin-bottom: 24px; }
  .lockup-icon { width: 42px; height: 42px; border-radius: 11px; }
  .lockup-wordmark { height: 33px; margin-top: 5px; }
}

.stage .sub {
  font-size: clamp(17px, 2.1vw, 20px); color: var(--muted);
  max-width: 30em; margin-bottom: 34px;
}

/* Waitlist form: one pill with the button inside */
.waitlist { width: 100%; max-width: 520px; text-align: left; }
.waitlist-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.waitlist-row:focus-within {
  border-color: var(--text);
  box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--text) 8%, transparent);
}
.waitlist input[type="email"] {
  flex: 1; min-width: 0;
  font: inherit; font-size: 16px; color: var(--text);
  background: transparent; border: 0; outline: none;
  padding: 10px 0;
}
.waitlist input::placeholder { color: var(--muted); }
.waitlist .hp { position: absolute; left: -9999px; }
.waitlist .btn { padding: 10px 10px 10px 20px; font-size: 15px; }
.btn-arrow { width: 26px; height: 26px; flex: none; }
.btn-arrow circle { fill: var(--on-ink); }
.btn-arrow path { stroke: var(--ink); }

.fine { margin: 16px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.fine a { color: var(--text); text-underline-offset: 2px; }

.waitlist-status { margin: 14px 0 0; font-size: 15px; font-weight: 500; color: var(--text); text-align: center; }
.waitlist-status:empty { display: none; }
.waitlist-status.is-error { color: #d93636; }
.waitlist.is-done .waitlist-row,
.waitlist.is-done .fine { display: none; }

@media (max-width: 480px) {
  .waitlist-row { padding-left: 18px; }
  .waitlist .btn { padding: 10px; }
  .waitlist .btn .btn-label-long { display: none; }
}
@media (min-width: 481px) {
  .waitlist .btn .btn-label-short { display: none; }
}

@media (max-width: 600px) {
  .stage .sub br { display: none; }
}

/* Short screens: tighten the spacing so it all still fits */
@media (max-height: 700px) {
  .stage { padding: 24px 0; }
  .discover { margin-top: 24px; }
  .lockup { margin-bottom: 18px; }
  .stage h1 { margin-bottom: 18px; }
  .stage .sub { margin-bottom: 24px; }
}

/* "Discover Repeatit" link under the waitlist form */
.discover {
  margin-top: 40px;
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--text);
  text-decoration: none;
}
.discover-arrow {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: background-color 0.15s, color 0.15s;
}
.discover-arrow svg { width: 16px; height: 16px; }
.discover:hover .discover-arrow { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .discover-arrow { animation: bob 2.4s ease-in-out 1.2s infinite; }
  @keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(5px); } }
}

/* ---------- Discover Repeatit: the sections below the hero ---------- */

#discover { scroll-margin-top: 68px; }
.feature { border-top: 1px solid var(--rule); padding: 88px 0; scroll-margin-top: 68px; }
.feature-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .feature { padding: 112px 0; }
  .feature-grid { grid-template-columns: 1.1fr 0.9fr; gap: 72px; }
  /* Alternate sides: every second section puts the image on the left */
  .feature:nth-of-type(even) .feature-copy { order: 2; }
}

.feature-kicker {
  display: flex; gap: 12px; align-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.feature-count { color: var(--text); font-variant-numeric: tabular-nums; }
.feature-copy h2 {
  font-size: clamp(34px, 4.8vw, 56px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.04;
  margin: 18px 0;
}
.feature-copy .lead { font-size: clamp(17px, 1.9vw, 19px); color: var(--muted); max-width: 32em; }
.feature-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.feature-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.feature-points svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }

.feature-media { display: flex; justify-content: center; }
.ph-phone, .feature-shot {
  height: min(580px, 72vh); width: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: 40px;
}
.ph-phone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px; text-align: center;
  color: var(--muted); font-size: 14px;
  border: 1.5px dashed color-mix(in srgb, var(--text) 22%, transparent);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(28, 28, 30, 0.025) 14px 28px),
    var(--surface);
}
.ph-phone strong { color: var(--text); font-size: 16px; line-height: 1.3; }
.ph-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
}
.ph-size { font-size: 12px; }
.feature-shot { object-fit: cover; box-shadow: var(--shadow); }
@media (max-width: 899px) {
  .ph-phone, .feature-shot { height: min(480px, 70vh); }
}

/* Closing call to action, with a second waitlist form */
.closing { border-top: 1px solid var(--rule); padding: 112px 0 120px; scroll-margin-top: 68px; }
.closing-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.closing h2 {
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.04;
  margin-bottom: 18px;
}
.closing .sub { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 30em; margin-bottom: 34px; }

/* ---------- Footer ---------- */

.foot {
  font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--rule);
}
.foot-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 10px; padding-top: 16px; padding-bottom: 16px;
}
.foot a { text-decoration: none; color: var(--text); }
.foot a:hover { text-decoration: underline; }
.foot .sep { opacity: 0.6; }

/* ---------- About ThreeBee page ---------- */

.page-threebee :focus-visible { outline-color: var(--honey); }
.page-threebee .tab[aria-current="page"] { background: var(--ink); color: var(--on-ink); }

.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.section h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; }

.tb-hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .tb-hero-grid { grid-template-columns: 1.2fr 0.8fr; } }

.tb-hero h1 { font-size: clamp(40px, 6.4vw, 64px); font-weight: 800; letter-spacing: -0.04em; margin: 22px 0 22px; }
.tb-hero h1 mark { background: none; color: inherit; box-shadow: inset 0 -0.32em 0 var(--honey); padding: 0 0.04em; }
.tb-hero .lede { font-size: clamp(18px, 2.2vw, 20px); color: var(--muted); max-width: 32em; }

.tb-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tb-eyebrow::before { content: ""; width: 22px; height: 4px; border-radius: 2px; background: var(--honey); }

.tb-mark { display: grid; place-items: center; }
.tb-mark img { width: 70%; max-width: 260px; }

.values { display: grid; gap: 16px; }
@media (min-width: 800px) { .values { grid-template-columns: repeat(3, 1fr); } }
.value {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px;
}
.value .num {
  display: block; margin-bottom: 14px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.value h3 { font-size: 21px; margin-bottom: 10px; }
.value p { color: var(--muted); }

.product-card {
  display: grid; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
@media (min-width: 760px) { .product-card { grid-template-columns: auto 1fr auto; padding: 36px 40px; } }
.product-card .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.product-card .wordmark { height: 30px; width: auto; margin-bottom: 10px; }
.product-card p { color: var(--muted); max-width: 36em; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted);
}
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--honey); }
.product-card .arrow { font-weight: 600; white-space: nowrap; }

.contact-block {
  background: var(--graphite); color: #f2f2f5;
  border-radius: var(--radius-lg); padding: 56px 28px; text-align: center;
}
.contact-block h2 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 800; }
.contact-block p { color: #a7a7ae; margin: 14px auto 28px; max-width: 30em; font-size: 18px; }
.contact-block .btn { background: var(--honey); color: #16171b; }


/* ---------- Legal pages ---------- */

.prose { max-width: calc(680px + 2 * var(--gutter)); padding-top: 64px; padding-bottom: 80px; }
.prose h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -0.035em; }
.prose .meta { margin-top: 10px; font-size: 14px; color: var(--muted); }
.prose .lead { margin-top: 28px; font-size: 20px; line-height: 1.5; }
.prose h2 { font-size: 20px; letter-spacing: -0.015em; margin: 40px 0 10px; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); }
.prose a { text-underline-offset: 2px; }
.prose .note {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule);
  font-size: 15px; color: var(--muted);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise-2 { animation-delay: 0.06s; }
  .rise-3 { animation-delay: 0.12s; }
  .rise-4 { animation-delay: 0.18s; }
  .rise-5 { animation-delay: 0.24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
