/* ============================================================
   TaskCat — Brand Color Theme
   ------------------------------------------------------------
   Derived from the logo: cream background, ink-black cat,
   amber bow tie. Warm, approachable, professional.
   ============================================================ */

:root {
  /* Surfaces */
  --cream:        #F7F1E5;   /* page background (logo bg)         */
  --cream-soft:   #FBF6EB;   /* card / raised surfaces            */
  --cream-line:   #E8DDC8;   /* hairlines and dividers            */
  --surface:      #FFFFFF;   /* highest elevation                 */

  /* Ink (the cat) */
  --ink:          #1A1714;   /* primary text                      */
  --ink-soft:     #3A332E;   /* secondary text                    */
  --whisker:      #7A6F65;   /* muted text                        */

  /* Amber (the bow tie) — brand accent */
  --amber:        #E89351;
  --amber-deep:   #C9712E;
  --amber-soft:   #FBD9B6;
  --amber-glow:   rgba(232, 147, 81, 0.18);

  /* Status */
  --success:      #3F8F5C;
  --warn:         #C98A2E;

  /* Shadows (warm tinted) */
  --shadow-sm:    0 1px 2px rgba(26, 23, 20, 0.06);
  --shadow-md:    0 8px 24px rgba(26, 23, 20, 0.08);
  --shadow-lg:    0 24px 60px rgba(26, 23, 20, 0.12);
  --shadow-glow:  0 0 0 6px var(--amber-glow);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Layout */
  --maxw: 1180px;
  --gutter: 24px;
}

/* ============================================================
   Reset & base
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ============================================================
   Decorative cream texture (subtle dot grid)
   ============================================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(26,23,20,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  font-weight: 700;
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; }

p  { margin: 0 0 1em; color: var(--ink-soft); }

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  background: var(--amber-soft);
  padding: 6px 12px;
  border-radius: 999px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--amber-deep);
  box-shadow: 0 0 0 3px rgba(201, 113, 46, 0.18);
}

.amber { color: var(--amber-deep); }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 96px 0;
}
.section--tight { padding: 64px 0; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 200ms ease, background 200ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--amber);
  --btn-fg: #fff;
  box-shadow: 0 6px 18px rgba(232, 147, 81, 0.35);
}
.btn--primary:hover { --btn-bg: var(--amber-deep); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1px solid var(--cream-line);
  background: var(--cream-soft);
}
.btn--ghost:hover { background: var(--surface); }

.btn--lg { padding: 16px 26px; font-size: 1.05rem; }

.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  background: rgba(247, 241, 229, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--cream-line);
  background: rgba(247, 241, 229, 0.92);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  color: var(--ink);
}
.brand__mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand__mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  /* Lift the cream-on-cream logo slightly off the page background */
  filter: drop-shadow(0 1px 1px rgba(26, 23, 20, 0.08));
}
.brand__amber { color: var(--amber-deep); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 150ms ease;
}
.nav__links a:hover { color: var(--ink); }

.nav__cta { display: flex; align-items: center; gap: 10px; }

@media (max-width: 820px) {
  .nav__links { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
}

.hero h1 .accent {
  background: linear-gradient(180deg, var(--amber) 0%, var(--amber-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero__meta {
  margin-top: 22px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--whisker);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta .dot { width: 6px; height: 6px; background: var(--success); border-radius: 999px; }

/* Hero visual: animated terminal/window */
.window {
  background: var(--cream-soft);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-0.6deg);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-line);
}
.window__dot { width: 11px; height: 11px; border-radius: 999px; background: var(--cream-line); }
.window__dot:nth-child(1) { background: #E08A7A; }
.window__dot:nth-child(2) { background: #E8C25A; }
.window__dot:nth-child(3) { background: #88C58E; }
.window__title {
  margin-left: 10px;
  color: var(--whisker);
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.window__body {
  padding: 22px 22px 26px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--ink-soft);
  min-height: 320px;
}

.line { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.line .who { width: 64px; flex-shrink: 0; color: var(--whisker); font-weight: 600; }
.line .what { flex: 1; }

.line.user .who   { color: var(--ink); }
.line.cat  .who   { color: var(--amber-deep); }
.line.tool .who   { color: var(--success); }

.cursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: var(--amber-deep);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.kbd {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--ink-soft);
}

/* Floating chips around the window */
.chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip .ico { width: 14px; height: 14px; }
.chip--1 { top: 24px; left: -28px; transform: rotate(-4deg); }
.chip--2 { bottom: 36px; left: -16px; transform: rotate(2deg); }
.chip--3 { top: 50%; right: -36px; transform: rotate(3deg); }
@media (max-width: 1080px) {
  .chip--1, .chip--2, .chip--3 { display: none; }
}

/* ============================================================
   Logos / "trusted by" strip
   ============================================================ */
.strip {
  border-top: 1px solid var(--cream-line);
  border-bottom: 1px solid var(--cream-line);
  background: var(--cream-soft);
  padding: 22px 0;
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--whisker);
  font-size: 0.9rem;
}
.strip__roles {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-weight: 600; color: var(--ink-soft);
}
.strip__roles span { display: inline-flex; align-items: center; gap: 8px; }
.strip__roles span::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: var(--amber);
}

/* ============================================================
   Features grid
   ============================================================ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
@media (max-width: 880px)  { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px)  { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--cream-soft);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(232, 147, 81, 0.35);
}
.feature__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--amber);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 6px; }
.feature p  { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ============================================================
   How it works (numbered steps)
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  counter-reset: step;
}
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber-deep);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.step h3 { margin-bottom: 6px; }
.step p  { margin: 0; color: var(--ink-soft); }

/* ============================================================
   Use-case cards
   ============================================================ */
.usecases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 40px;
}
@media (max-width: 720px) { .usecases { grid-template-columns: 1fr; } }

.usecase {
  background: var(--cream-soft);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-md);
  padding: 22px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: background 200ms ease, transform 200ms ease;
}
.usecase:hover { background: var(--surface); transform: translateY(-2px); }
.usecase__tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber-deep);
  background: var(--amber-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.usecase__text strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 1rem; }
.usecase__text span { color: var(--ink-soft); font-size: 0.94rem; }

/* ============================================================
   Security panel
   ============================================================ */
.security {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-xl);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.security h2 { color: var(--cream); }
.security p  { color: rgba(247, 241, 229, 0.78); }
.security::before {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  right: -80px; top: -80px;
  background: radial-gradient(circle, var(--amber-glow), transparent 70%);
  pointer-events: none;
}
@media (max-width: 880px) {
  .security { grid-template-columns: 1fr; padding: 36px; }
}

.security__list {
  display: grid; gap: 14px; margin: 0; padding: 0; list-style: none;
}
.security__list li {
  display: flex; gap: 12px; align-items: flex-start;
  color: rgba(247, 241, 229, 0.92);
  font-size: 0.98rem;
}
.security__list .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.78rem;
  margin-top: 2px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  margin-top: 32px;
  display: grid;
  gap: 12px;
  max-width: 820px;
}
.faq details {
  background: var(--cream-soft);
  border: 1px solid var(--cream-line);
  border-radius: var(--r-md);
  padding: 18px 22px;
  transition: background 200ms ease;
}
.faq details[open] { background: var(--surface); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--amber-deep);
  transition: transform 200ms ease;
}
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 12px 0 0; color: var(--ink-soft); }

/* ============================================================
   Waitlist CTA
   ============================================================ */
.cta-card {
  background: linear-gradient(180deg, var(--cream-soft), var(--surface));
  border: 1px solid var(--cream-line);
  border-radius: var(--r-xl);
  padding: 56px;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: "";
  position: absolute; inset: auto -10% -50% -10%;
  height: 220px;
  background: radial-gradient(ellipse at center, var(--amber-glow), transparent 60%);
  pointer-events: none;
}
@media (max-width: 720px) { .cta-card { padding: 36px 24px; } }

.cta-card__logo {
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(26, 23, 20, 0.12));
}

.waitlist {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 24px auto 0;
}
.waitlist input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  color: var(--ink);
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.waitlist input:focus {
  border-color: var(--amber);
  box-shadow: var(--shadow-glow);
}
.waitlist__msg {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--success);
  min-height: 1.2em;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--cream-line);
  padding: 48px 0 36px;
  margin-top: 64px;
  background: var(--cream-soft);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__brand p {
  color: var(--whisker);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 28ch;
}
.footer__cols {
  display: flex; gap: 56px; flex-wrap: wrap;
}
.footer__col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--whisker);
  margin: 0 0 12px;
}
.footer__col a {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 4px 0;
  transition: color 150ms ease;
}
.footer__col a:hover { color: var(--amber-deep); }

.footer__base {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--cream-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--whisker);
  font-size: 0.85rem;
}

/* ============================================================
   Reveal-on-scroll
   ------------------------------------------------------------
   Content is visible by default. The opacity-0 starting state is
   only applied when JS has marked <html class="js"> — that way a
   broken / slow / blocked main.js can never leave the page blank.
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
