/* =========================================================================
   Workmates marketing site — mid-century-modern, dark-canvas theme.
   Palette + type derived from design.md ("Mat"), pushed fully dark-mode per
   brief: sage canvas throughout, bone paper reserved for card/table surfaces.
   ========================================================================= */

:root {
  /* ---- color ---- */
  --bg: #0d120e;            /* near-black dark green canvas */
  --bg-alt: #141a15;        /* alt sections, header */
  --bg-alt-2: #1c241d;      /* card-on-dark, table head */
  --paper: #ede6d0;         /* bone paper surface */
  --paper-ink: #26301f;     /* dark text on paper */
  --ink: #f4eeda;           /* bone text on dark */
  --muted: #d1d8cd;         /* secondary text on dark (15% lighter than original #a9b6a2) */
  --muted-paper: #6b6552;   /* secondary text on paper */
  --accent: #ffd23f;        /* Workmates' own product yellow — every clickable/primary accent */
  --accent-ink: #1a1400;    /* dark text on yellow fill, same pairing the app uses */
  --accent-2: #35d0a5;      /* Workmates' teal — secondary/decorative accent (matches the candidate wordmark) */
  --wood: #a5652f;          /* lighter wood brown — hover/secondary accent on dark */
  --border: rgba(244, 238, 218, 0.14);
  --border-strong: rgba(244, 238, 218, 0.26);
  --border-paper: rgba(38, 48, 31, 0.16);
  --good: #35d0a5;          /* affirmative accent on dark surfaces (hero checklist) */
  --good-paper: #1f6f52;    /* darker forest green — reads clearly on the bone paper table */
  --bad: #9c3f2b;           /* muted brick red for pricing crosses — warm, not a stark alarm red */

  /* ---- type ---- */
  --font-display: 'Bricolage Grotesque', 'Jost', system-ui, sans-serif;
  --font-body: 'Jost', system-ui, -apple-system, sans-serif;

  /* ---- shape / motion ---- */
  --radius: 4px;
  --radius-lg: 10px;
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 6px 20px rgba(0, 0, 0, 0.32);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---- layout ---- */
  --container: 1280px;
  --gap-sm: 1.5rem;
  --gap-md: 3rem;
  --gap-lg: 6rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 3.2vw + 1.6rem, 4.4rem); }
h2 { font-size: clamp(1.9rem, 1.6vw + 1.4rem, 2.7rem); }
h3 { font-size: 1.3rem; }

p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: clamp(4rem, 8vw, 8rem) 0; }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-flex; align-items: center;
  font-family: var(--font-body); font-weight: 500;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2);
}

.section-head { max-width: 640px; margin: 0 0 var(--gap-md); }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 1.1rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), filter 200ms var(--ease), background 200ms var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); filter: brightness(0.96); }
/* A button that's switched off for now (space creation, during the Alpha). */
.btn.is-disabled, .btn.is-disabled:hover, .btn.is-disabled:active {
  opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; transform: none;
}
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-ghost:hover { background: rgba(244, 238, 218, 0.06); border-color: var(--ink); }
.btn-sm { padding: 0.6em 1.2em; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 18, 14, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 22px; width: auto; display: block; }
@media (max-width: 480px) {
  .brand-logo { height: 20px; }
}

.site-nav { display: flex; align-items: center; gap: 2.2rem; }
.nav-links { display: flex; gap: 2.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative;
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.98rem;
  transition: color 160ms var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent);
}
@media (max-width: 860px) {
  .nav-links a.active::after { display: none; }
  .site-nav.open .nav-links a.active { border-left: 3px solid var(--accent); padding-left: 0.6rem; margin-left: -0.6rem; }
}
.nav-cta { display: flex; align-items: center; gap: 0.9rem; }

.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle svg { color: var(--ink); }

.nav-cta-link .short { display: none; }
@media (max-width: 420px) {
  .nav-cta-link .full { display: none; }
  .nav-cta-link .short { display: inline; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta-link { display: none; }
  .site-nav.open .nav-links {
    display: flex; flex-direction: column; gap: 0; position: absolute;
    top: 72px; left: 0; right: 0; background: var(--bg-alt);
    border-bottom: 1px solid var(--border); padding: 0.5rem 1.5rem 1.25rem;
  }
  .site-nav.open .nav-links a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
  .site-nav.open .nav-links li:last-child a { border-bottom: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(5.5rem, 11vw, 9rem) 0 clamp(6rem, 11vw, 10rem); overflow: hidden; border-bottom: 24px solid var(--border); }
/* Falling-emoji backdrop, scoped to the hero. A sepia+blur filter on the
   wrapper mutes the emoji glyphs into a soft, ambient tint rather than a
   literal emoji shower — see js/hero-rain.js for the fall logic. */
.hero-rain {
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
  pointer-events: none;
  filter: sepia(50%) blur(1px);
}
.hero-rain-field { position: relative; width: 100%; height: 100%; }
.hero-rain-field span {
  position: absolute; top: 0; left: 0;
  line-height: 1; opacity: 0;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: reduce) {
  .hero-rain { display: none; }
}
.hero .container { position: relative; z-index: 1; }
.hero-copy {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 900px; margin: 0 auto;
}
.hero-copy .eyebrow { margin-bottom: 1.1rem; }
.hero-copy h1 { margin-bottom: 1.25rem; }
.hero-copy .lede { font-size: 1.2rem; color: var(--muted); max-width: 46ch; margin-bottom: 2rem; }
.hero-cta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; font-size: 0.9rem; color: var(--muted); padding: 0; }
.hero-trust li { display: flex; align-items: center; gap: 0.5em; list-style: none; }
.hero-trust svg { color: var(--good); flex: none; }
.hero-trust ul { display: contents; margin: 0; padding: 0; }

/* ---------- how it works (split, zig-zag) ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split-copy .eyebrow { margin-bottom: 1.1rem; }
.split-copy h2 { margin-bottom: 1.1rem; }
.split-copy p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.8rem; }
.split-art { position: relative; }
.split-art img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-art { order: -1; max-width: 380px; margin: 0 auto; }
}

/* ---------- features (even tile grid) ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem;
}
.feature-card {
  background: var(--bg-alt-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 0.9rem;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease);
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: rgba(53, 208, 165, 0.14); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.feature-card h3 { color: var(--ink); }
.feature-card p { color: var(--muted); font-size: 0.98rem; }

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- pricing ---------- */
.pricing-scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.pricing-table {
  table-layout: fixed;
  width: 100%; min-width: 920px; border-collapse: separate; border-spacing: 0;
  background: var(--paper); color: var(--paper-ink);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card);
  border-top-left-radius: 0;
}
.pricing-table th, .pricing-table td {
  padding: 1rem 1.4rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border-paper);
}
.pricing-table thead th {
  background: var(--bg-alt-2); color: var(--ink); border-bottom: none;
  vertical-align: top; padding-top: 1.6rem; padding-bottom: 1.6rem;
}
.pricing-table thead th:first-child { background: var(--bg-alt); }
/* subtle vertical zebra striping down alternating tier columns */
.pricing-table thead th:nth-child(odd):not(:first-child) { background: #212b22; }
.pricing-table tbody td:nth-child(odd) { background: rgba(38, 48, 31, 0.045); }
.tier-name { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.2rem; }
.tier-cap { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.tier-price { font-family: var(--font-display); font-size: 1.9rem; color: var(--accent-2); }
.tier-price small { font-family: var(--font-body); font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.pricing-table thead th .btn { margin-top: 0.9rem; }
.pricing-table tbody th { font-weight: 500; color: var(--paper-ink); background: var(--paper); }
.pricing-table tbody tr:last-child td, .pricing-table tbody tr:last-child th { border-bottom: none; }
.pricing-table td { text-align: center; }
.pricing-table .feat-icon { display: inline-flex; vertical-align: middle; }
.pricing-table .feat-icon.yes { color: var(--good-paper); }
.pricing-table .feat-icon.no { color: var(--bad); }
.pricing-note { margin-top: 1.25rem; color: var(--muted); font-size: 0.92rem; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-alt-2); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; color: var(--ink);
  padding: 1.15rem 1.4rem;
}
.faq-q .chev { color: var(--accent); flex: none; transition: transform 220ms var(--ease); }
.faq-item[data-open="true"] .chev { transform: rotate(180deg); }
.faq-a-wrap {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms var(--ease);
}
.faq-item[data-open="true"] .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a { overflow: hidden; }
.faq-a p { padding: 0 1.4rem 1.3rem; color: var(--muted); max-width: 66ch; }

/* ---------- final CTA band ---------- */
.cta-band { position: relative; border-radius: var(--radius-lg); }
/* Slow-drifting gradient "border" in the site's own palette, adapted from a
   pasted reference. The glow sits on .cta-band at a negative z-index, which
   (per CSS stacking rules) paints above .cta-band's own background but
   below any normal in-flow child — so the actual card surface has to live
   on a separate .cta-band-inner child to mask everything but the rim. */
.cta-band::before, .cta-band::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(115deg, var(--accent), var(--wood), var(--accent-2), var(--ink), var(--accent));
  background-size: 300% 300%;
  z-index: -1;
  animation: cta-border-flow 12s ease infinite;
}
.cta-band::after { filter: blur(30px); opacity: 0.8; }
@keyframes cta-border-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .cta-band::before, .cta-band::after { animation: none; }
}
.cta-band-inner {
  background: linear-gradient(135deg, var(--bg-alt-2), var(--bg-alt));
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem;
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: var(--muted); }
.cta-band-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: var(--gap-md) 0 var(--gap-sm); }
.footer-top { display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap; margin-bottom: var(--gap-md); }
.footer-brand { max-width: 400px; }
.footer-brand .brand-logo { height: 40px; margin-bottom: 0.2rem; }
.footer-brand p { color: var(--muted); margin-top: 0.9rem; font-size: 0.95rem; }
.footer-nav { display: flex; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.footer-col a { text-decoration: none; color: var(--ink); font-size: 0.98rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: var(--gap-sm); border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.88rem;
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- scroll-reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 480ms var(--ease), transform 480ms var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }


/* ---------- feedback / bug-report tab ---------- */
/* writing-mode instead of rotate()+translate() — a rotated horizontal box's
   bounding box doesn't shrink to match, so it was clipping against the
   viewport edge; a vertical writing mode sizes correctly with no transform
   math to get wrong. Matches the in-app widget's styling (public/css/feedback.css). */
#feedback-tab {
  position: fixed; top: 50%; right: 0;
  /* Standalone translate/rotate (not the `transform` property) — spec order
     applies translate BEFORE rotate, so this centers first, then rotates
     the already-centered box in place. transform: translateY(-50%) here
     instead would apply AFTER rotate, flipping the Y axis in the rotated
     frame and pushing the tab down by its own height instead of centering
     it (exactly the bug this replaced). */
  translate: 0 -50%; rotate: 180deg;
  writing-mode: vertical-rl; text-orientation: sideways;
  z-index: 700;
  background: #33bf97; color: #06251d;
  font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none;
  padding: 16px 9px;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: filter 0.15s ease;
}
#feedback-tab:hover { filter: brightness(1.08); }
#feedback-tab[hidden] { display: none; }

#feedback-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 92vw;
  background: var(--bg-alt-2);
  border-left: 1px solid var(--border-strong);
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.4);
  z-index: 900;
  display: flex; flex-direction: column;
}
#feedback-panel[hidden] { display: none; }
.feedback-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-strong);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--ink);
}
.feedback-panel-head button {
  background: none; border: none; color: var(--muted);
  font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 2px 6px;
}
.feedback-panel-head button:hover { color: var(--ink); }
#feedback-panel iframe {
  flex: 1; width: 100%; border: none; background: #fff;
}

@media (max-width: 480px) {
  #feedback-panel { width: 100%; max-width: 100%; }
}

/* ---------- legal pages (privacy policy) ---------- */
.legal { padding: clamp(3rem, 6vw, 5rem) 0 var(--gap-lg); }
.legal-container { max-width: 760px; }
.legal h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0.6rem 0 0.4rem; }
.legal-updated { color: var(--muted); font-size: 0.95rem; margin-bottom: 2rem; }
.legal h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 2.6rem 0 0.8rem; }
.legal h3 { font-size: 1.15rem; margin: 1.8rem 0 0.5rem; }
.legal p, .legal li { line-height: 1.7; color: var(--ink); }
.legal p { margin: 0 0 1rem; }
.legal ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--accent); }
