/* CounterSpace — palette and type taken from the logo sheet.
   Charcoal wordmark, off-white screen, coral / sky / amber / green cards, grey rotation arrow. */
:root {
  --ink: #232d34;        /* wordmark charcoal */
  --ink-2: #3c4751;
  --muted: #6b7680;
  --line: #e3e6e9;
  --arrow: #b6bdc5;      /* grey arrow */
  --paper: #ffffff;
  --screen: #f9f7f5;     /* e-ink screen off-white */
  --coral: #fd9690;
  --coral-ink: #d9534b;  /* darker coral for buttons/links so text passes contrast */
  --sky: #7cc8eb;
  --sky-ink: #2b86b5;
  --amber: #fdb947;
  --green: #39816a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35,45,52,.06), 0 8px 24px rgba(35,45,52,.08);
  --font: "Montserrat", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 44rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
section { padding: 4.5rem 0; }
section + section { border-top: 1px solid var(--line); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1rem; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a { color: var(--ink); font-weight: 600; font-size: .95rem; }
.nav a:hover { text-decoration: none; color: var(--coral-ink); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 999px; font-weight: 700; font-size: .98rem; font-family: inherit;
  border: 2px solid transparent; cursor: pointer; text-decoration: none !important; transition: transform .08s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #111920; }
.btn-coral { background: var(--coral-ink); color: #fff; }
.btn-coral:hover { background: #c4443c; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: .5rem .9rem; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Hero */
.hero { padding: 5rem 0 4rem; background: linear-gradient(180deg, var(--screen) 0%, #fff 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.hero-photo { margin: 0; }
.hero-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Display mock (unused on the home page now the photo mockups are in; kept for the dashboards) */
.frame-mock { position: relative; width: min(100%, 440px); margin-inline: auto; }
.frame { background: var(--ink); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); aspect-ratio: 5 / 3; }
.frame .screen { background: var(--screen); border-radius: 6px; height: 100%; padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow: hidden; }
.ad-tile { background: #fff; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; border: 1px solid #ece9e4; }
.ad-tile .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--amber); }
.ad-tile .bar { height: 6px; border-radius: 3px; background: var(--arrow); width: 80%; }
.ad-tile .bar.coral { background: var(--coral); width: 60%; }
.ad-tile .bar.green { background: var(--green); width: 50%; }
.ad-tile .bar.sky { background: var(--sky); width: 70%; }
.ad-tile.qr { align-items: center; justify-content: center; text-align: center; font-size: .72rem; color: var(--ink-2); font-weight: 700; }
.ad-tile.qr .grid { display: grid; grid-template-columns: repeat(5, 8px); gap: 2px; margin-bottom: 6px; }
.ad-tile.qr .grid i { width: 8px; height: 8px; background: var(--ink); }
.ad-tile.qr .grid i:nth-child(3n) { background: transparent; }
.frame-caption { text-align: center; margin-top: .9rem; color: var(--muted); font-size: .9rem; }
.rotate-arrow { position: absolute; left: -22px; bottom: 44px; width: 70px; opacity: .9; }

/* Cards and grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card.tint-coral { border-top: 5px solid var(--coral); }
.card.tint-sky { border-top: 5px solid var(--sky); }
.card.tint-amber { border-top: 5px solid var(--amber); }
.card.tint-green { border-top: 5px solid var(--green); }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: var(--ink); margin-bottom: .75rem; }

/* Pricing */
.plan { display: flex; flex-direction: column; gap: .5rem; }
.plan .price { font-size: 2.2rem; font-weight: 800; }
.plan .price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.plan ul { padding-left: 1.1rem; margin: .5rem 0 1rem; color: var(--ink-2); }
.plan li { margin: .25rem 0; }
.plan .btn { margin-top: auto; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; background: var(--screen); color: var(--ink-2); }
.badge.coral { background: #ffe3e1; color: var(--coral-ink); }
.badge.green { background: #e1f0ea; color: var(--green); }
.badge.amber { background: #fff1d6; color: #9a6400; }
.badge.sky { background: #e2f3fb; color: var(--sky-ink); }

/* Forms */
form .field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; font: inherit; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky-ink); box-shadow: 0 0 0 3px rgba(124,200,235,.35); }
.form-note { font-size: .85rem; color: var(--muted); }
.alert { padding: .8rem 1rem; border-radius: 10px; margin: 1rem 0; font-size: .95rem; }
.alert-error { background: #ffe3e1; color: #8a2a24; }
.alert-ok { background: #e1f0ea; color: #1f5a47; }
.alert-info { background: #e2f3fb; color: #1b5a7a; }

/* Narrow pages (board, signup, login) */
.narrow { width: min(560px, 100% - 2.5rem); margin: 3rem auto; }
.narrow .card { padding: 2rem; }
.board-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.board-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 1.1rem; letter-spacing: .15em; background: var(--screen); padding: .3rem .6rem; border-radius: 8px; }

/* App shell (dashboards) */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 72px); }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } .app aside { display: none; } }
.app aside { border-right: 1px solid var(--line); padding: 1.5rem 1rem; background: var(--screen); }
.app aside a { display: block; padding: .55rem .75rem; border-radius: 8px; color: var(--ink); font-weight: 600; }
.app aside a.active, .app aside a:hover { background: #fff; text-decoration: none; }
.app main { padding: 2rem; }
.app h1 { font-size: 1.8rem; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat .n { font-size: 2rem; font-weight: 800; }
.stat .l { color: var(--muted); font-size: .9rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; background: var(--arrow); }
.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--coral-ink); }
.status-dot.provisioned { background: var(--amber); }
.preview-img { border: 8px solid var(--ink); border-radius: 10px; background: var(--screen); width: 100%; max-width: 400px; aspect-ratio: 5/3; object-fit: contain; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.hidden { display: none !important; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-footer img { height: 56px; }
.site-footer a { color: var(--muted); }

/* Preview mode banner */
.demo-bar { background: var(--amber); color: var(--ink); font-size: .85rem; font-weight: 600; text-align: center; padding: .45rem 1rem; }
.demo-bar a { color: var(--ink); text-decoration: underline; margin-left: .5rem; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0; }
.role-pick button { font-family: inherit; font-weight: 700; padding: .8rem; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.role-pick button:hover { border-color: var(--ink); }
.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .checkout { grid-template-columns: 1fr; } }
.stripe-mock { border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; background: #fff; }
.stripe-mock .pill { display: inline-block; background: #635bff; color: #fff; font-size: .72rem; font-weight: 800; padding: .2rem .5rem; border-radius: 4px; letter-spacing: .05em; }
