/* Countline — home hero (Figma: Web-Site_Update, Home v3 Desktop 1441 / Tablet 834 / Mobile 390) */

@font-face {
  font-family: 'TWK Everett';
  src: url('font/TWKEverett-Regular-web.woff2') format('woff2'), url('font/TWKEverett-Regular-web.woff') format('woff');
  font-weight: 400 600; /* no Medium web file yet: Regular stands in for Medium */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TWK Everett';
  src: url('font/TWKEverett-Bold-web.woff2') format('woff2'), url('font/TWKEverett-Bold-web.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --ink-2: #6b6b6b;
  --ink-3: #a3a3a3;
  --line: #000000;
  --surface: #ffffff;
  --secondary: #edeff1;
  --grey: #edeff1;
  --lime: #c9ff00; --pink: #ff86f4; --blue: #0088ff; --orange: #ff5b02; --purple: #ae56e8; --yellow: #ffcb04; --green: #019845;
  --sans: 'TWK Everett', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'TWK Everett Mono', 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --side: 56px;
  --header: 72px;
  --h1: 88px;
  --pile-min: 240px;
  --value: 28px;
  color-scheme: light;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header: logo only ── */
.site-header {
  position: relative;
  z-index: 3;
  height: var(--header);
  display: flex;
  align-items: center;
  padding-left: max(var(--side), env(safe-area-inset-left, 0px));
  padding-right: max(var(--side), env(safe-area-inset-right, 0px));
  max-width: 1440px;
  margin: 0 auto;
  pointer-events: none;
}
.logo { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; pointer-events: auto; }
.logo-mark { width: 39px; height: 39px; flex: none; }
.logo-text { font-weight: 700; font-size: 26px; line-height: 1.2; letter-spacing: -0.005em; }

/* ── Hero ── */
.hero {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 72px;
  /* the whole first screen fits the browser; only the contact block sits below */
  height: calc(100vh - var(--header));
  height: calc(100svh - var(--header));
  min-height: 560px;
  display: flex;
  flex-direction: column;
}
.hero-head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-left: max(var(--side), env(safe-area-inset-left, 0px));
  padding-right: max(var(--side), env(safe-area-inset-right, 0px));
  pointer-events: none; /* cards behind the text stay draggable */
}
.hero-head form { pointer-events: auto; }

h1 {
  font-weight: 500;
  font-size: var(--h1);
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 10em;
  text-wrap: balance;
  user-select: none;
  -webkit-user-select: none;
}
h1 .grey { color: var(--ink-3); }

/* Drop form: one underline across event + date, button on the right */
.drop {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 32px;
  width: min(760px, 100%);
}
.drop-input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-bottom: 12px; }
.field-event { flex: 1; }
.field-label {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-2);
  user-select: none;
  -webkit-user-select: none;
}
.field input, .field-date {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--value);
  line-height: 32px;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
  outline: none;
}
.field input:focus-visible { outline: none; }
.drop-input:has(input:focus) { border-bottom-color: var(--blue); box-shadow: 0 1px 0 var(--blue); }
.field-date {
  flex: none;
  width: 200px;
  text-align: right;
  padding-bottom: 12px;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.field-date[aria-expanded="true"] #date-label { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

.btn {
  flex: none;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  font-size: 17px;
  line-height: 20px;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

/* ── Calendar popover (DatePickerSheet, calendar part) ── */
.calendar {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 5;
  width: 402px;
  max-width: 100%;
  padding: 20px 20px 20px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .14);
  user-select: none;
  -webkit-user-select: none;
}
.calendar[hidden] { display: none; }
.cal-top { display: flex; justify-content: space-between; margin-bottom: 20px; }
.cal-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.cal-icon svg { width: 22px; height: 22px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cal-close { background: var(--secondary); }
.cal-close svg { stroke: var(--ink); }
.cal-ok { background: var(--ink); }
.cal-ok svg { stroke: #fff; }
.cal-month { display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 17px; margin-bottom: 14px; padding-inline: 4px; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.cal-nav button:hover { background: var(--secondary); }
.cal-nav svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cal-dow, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-dow { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.cal-days { row-gap: 4px; }
.cal-days button {
  justify-self: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.cal-days button:hover { background: var(--secondary); }
.cal-days button.out { color: var(--ink-3); }
.cal-days button.today { box-shadow: inset 0 0 0 1px var(--ink); }
.cal-days button[aria-selected="true"] { background: var(--ink); color: #fff; }

/* ── Pile ── */
.pile-floor { flex: 1 1 auto; min-height: var(--pile-min); }
.stage {
  position: absolute;
  left: 0; right: 0;
  top: calc(-1 * var(--header));
  bottom: 0;
  z-index: 1;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.stage.dragging { cursor: grabbing; }
.stage * { user-select: none; -webkit-user-select: none; }

.card, .chip, .store-card {
  position: absolute;
  left: 0; top: 0;
  will-change: transform;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}
.card {
  --s: 1;
  height: calc(92px * var(--s));
  border-radius: calc(46px * var(--s));
  padding: 0 calc(36px * var(--s));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12px * var(--s));
  color: var(--ink);
}
.card .name { font-weight: 500; font-size: calc(21px * var(--s)); line-height: 1.15; letter-spacing: -0.005em; white-space: nowrap; }
.card .date { font-family: var(--mono); font-size: calc(13px * var(--s)); line-height: 1.25; letter-spacing: .02em; text-transform: uppercase; margin-top: calc(2px * var(--s)); white-space: nowrap; }
.card .val { display: flex; align-items: flex-start; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card .val b { font-weight: 500; font-size: calc(34px * var(--s)); line-height: 1; letter-spacing: -0.02em; }
.card .val sup { font-size: calc(18px * var(--s)); line-height: 1; margin: 0 calc(8px * var(--s)) 0 calc(3px * var(--s)); }
.card .val sup:last-child { margin-right: 0; }

.chip {
  --s: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
}
.chip svg { width: calc(36px * var(--s)); height: calc(36px * var(--s)); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip-plus { background: #fff; border: 1px solid var(--secondary); }
.chip-plus svg { stroke: var(--ink); }
.chip-check { background: var(--ink); }
.chip-check svg { stroke: #fff; }
.chip-shake { background: var(--ink); color: #fff; }
.chip-shake b { display: block; font-weight: 500; font-size: calc(28px * var(--s)); line-height: 1.05; letter-spacing: -0.02em; }
.chip-shake span { display: block; font-family: var(--mono); font-size: calc(13px * var(--s)); letter-spacing: .02em; text-transform: uppercase; }
.chip-plus, .chip-shake, .store-card { cursor: pointer; }

.store-card { border-radius: calc(14px * var(--s, 1)); }
.store-card img { display: block; width: 100%; height: 100%; pointer-events: none; }

.tilt-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: 12px;
  z-index: 2;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-2);
  pointer-events: none;
}

/* ── Bottom ── */
.bottom {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px max(var(--side), env(safe-area-inset-right, 0px)) 64px max(var(--side), env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 14px;
  line-height: 1.4;
}
.bottom p { max-width: 480px; }
.social-icons { display: flex; gap: 20px; }
.social-icons a { display: flex; transition: opacity .2s; }
.social-icons a:hover { opacity: .6; }
.social-icons svg { width: 24px; height: 24px; }
.legal-links { display: flex; gap: 24px; }

/* ── Tablet ── */
@media (max-width: 1100px) {
  :root { --side: 32px; --h1: 64px; --pile-min: 260px; }
  .hero { padding-top: 56px; }
  .hero-head { gap: 40px; }
  .drop { width: 100%; }
  .field-date { width: 180px; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  :root { --side: 16px; --h1: 44px; --pile-min: 240px; --value: 22px; }
  .hero { min-height: 600px; }
  .hero { padding-top: 40px; }
  .hero-head { gap: 32px; }
  h1 { max-width: none; }
  .drop { flex-direction: column; align-items: stretch; gap: 20px; }
  .field-date { width: auto; min-width: 96px; padding-left: 12px; }
  .drop .btn { display: none; }
  .calendar { width: 100%; top: 81px; }
  .cal-days button { width: 38px; height: 38px; }
}

/* short laptop screens: tighter head so the pile keeps room */
@media (min-width: 641px) and (max-height: 860px) {
  :root { --h1: 72px; }
  .hero { padding-top: 40px; }
  .hero-head { gap: 32px; }
}
@media (min-width: 641px) and (max-height: 700px) {
  :root { --h1: 56px; }
  .hero { padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ══════════════════════════════════════
   Legal Pages (Privacy, Terms, Accessibility)
   ══════════════════════════════════════ */

.legal-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px max(var(--side), env(safe-area-inset-left, 0px)) 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.legal-page .title,
.legal-page .text {
  width: 100%;
  max-width: 740px;
}

.legal-page .title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
}

.legal-page .text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.legal-page .text h2 {
  font-weight: 700;
  font-size: 18px;
  line-height: 20px;
}

.legal-page .text p {
  font-weight: 400;
  font-size: 16px;
  line-height: 18px;
  letter-spacing: -0.43px;
}

.legal-page .text a {
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-weight: 400;
  font-size: 16px;
  line-height: 18px;
  letter-spacing: -0.43px;
}

.feature-list .bullet {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .legal-page {
    gap: 24px;
    padding-bottom: 48px;
  }

  .legal-page .title {
    font-size: 28px;
  }
}
