/* Generated from src/app/tokens-base.css, tokens-kit.css, and site.css for frontend route-group CSS fallback. */

/* src/app/tokens-base.css */
/* ============================================================
   CloudFloo Design System — Tokens
   Inspired by Linear. True-black surfaces, typography-led,
   one precision gradient accent (cyan → purple → magenta).
   ============================================================ */

/* ---- Fonts ---- */
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable-Italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("/fonts/ClashDisplay-Variable.woff2") format("woff2-variations");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clash Display Fallback";
  src: local("Arial");
  size-adjust: 98%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Georgia");
  size-adjust: 104%;
}

:root {
  /* ---------- Color: backgrounds (true black) ---------- */
  --bg-base:       #09090b;
  --bg-surface:    #111113;
  --bg-elevated:   #1a1a1f;
  --bg-overlay:    #222228;

  /* ---------- Color: text hierarchy ---------- */
  --text-primary:   #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary:  #52525b;
  --text-inverse:   #09090b;

  /* ---------- Color: brand ---------- */
  --brand-cyan:    #00d4ff;
  --brand-purple:  #7c3aed;
  --brand-pink:    #ec4899;
  --brand-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #ec4899 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(0,212,255,0.12) 0%, rgba(124,58,237,0.12) 50%, rgba(236,72,153,0.12) 100%);

  /* ---------- Color: borders ---------- */
  --border-subtle:  #27272a;
  --border-default: #3f3f46;
  --border-strong:  #52525b;

  /* ---------- Color: semantic ---------- */
  --success: #22c55e;
  --warning: #f59e0b;
  --error:   #ef4444;
  --info:    #3b82f6;

  /* ---------- Typography: families ---------- */
  --font-display: "Clash Display", "Clash Display Fallback", "Inter", system-ui, sans-serif;
  --font-serif:   "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", "Menlo", monospace;

  /* ---------- Typography: scale ---------- */
  --text-hero:    clamp(48px, 8.5vw, 132px);
  --text-display: clamp(40px, 6vw, 80px);
  --text-h1:      clamp(32px, 4vw, 56px);
  --text-h2:      clamp(24px, 3vw, 40px);
  --text-h3:      20px;
  --text-h4:      16px;
  --text-body-lg: 18px;
  --text-body:    16px;
  --text-body-sm: 14px;
  --text-caption: 12px;
  --text-label:   11px;

  --leading-tight:   0.95;
  --leading-display: 1.0;
  --leading-h1:      1.1;
  --leading-h2:      1.15;
  --leading-h3:      1.3;
  --leading-body:    1.7;
  --leading-mono:    1.5;

  --tracking-tight:   -0.05em;
  --tracking-display: -0.03em;
  --tracking-body:    -0.01em;
  --tracking-label:    0.08em;

  /* ---------- Spacing scale (4px base) ---------- */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;
  --space-32:  128px;
  --space-40:  160px;
  --space-48:  192px;
  --space-64:  256px;

  /* ---------- Layout ---------- */
  --container-max: 1280px;
  --gutter:        24px;

  /* ---------- Radius ---------- */
  --radius-xs: 4px;   /* tech tags */
  --radius-sm: 6px;
  --radius-md: 8px;   /* inputs */
  --radius-lg: 12px;  /* cards */
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* ---------- Shadows / Elevation ---------- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.6);
  --shadow-focus: 0 0 0 2px rgba(0,212,255,0.4);

  /* ---------- Motion ---------- */
  --ease-snap:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-linear:  linear;
  --duration-fast:    100ms;
  --duration-normal:  200ms;
  --duration-slow:    400ms;

  /* ---------- Breakpoints (for reference) ---------- */
  --bp-sm:  480px;
  --bp-md:  768px;
  --bp-lg:  1024px;
  --bp-xl:  1280px;
  --bp-2xl: 1536px;

  /* ---------- Touch & viewport (mobile-first) ---------- */
  --touch-target-min: 44px;   /* WCAG 2.5.5 minimum */
  --touch-target-cmf: 48px;   /* comfortable — what we hit by default */
  --touch-target-lg:  56px;   /* primary CTAs on mobile */

  /* Use 100dvh on mobile to avoid the Safari URL-bar jump.
     Fallback to 100vh for older browsers via @supports. */
  --vh-100: 100vh;

  /* Safe-area insets (notch / dynamic island / home indicator) */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);

  /* Container / gutter (mobile-first; raised at media queries below) */
  --container-pad:  20px;
  --section-gap:    96px;       /* between major sections */
  --section-gap-in: 48px;       /* within a section */
}

@supports (height: 100dvh) {
  :root { --vh-100: 100dvh; }
}

/* ============================================================
   Responsive ramps — mobile-first
   Defaults above target ≤480. We bump container, section rhythm,
   and a couple of fixed sizes upward at each breakpoint.
   ============================================================ */

@media (min-width: 480px) {
  :root {
    --container-pad: 24px;
  }
}
@media (min-width: 768px) {
  :root {
    --container-pad:  32px;
    --section-gap:    128px;
    --section-gap-in: 64px;
    --text-h3:        22px;
    --text-h4:        17px;
    --text-body-lg:   19px;
  }
}
@media (min-width: 1024px) {
  :root {
    --container-pad:  48px;
    --section-gap:    192px;
    --section-gap-in: 80px;
  }
}
@media (min-width: 1280px) {
  :root {
    --container-pad:  80px;
    --section-gap:    256px;
    --section-gap-in: 96px;
    --text-h3:        24px;
  }
}

/* ============================================================
   Base + Semantic Styles
   ============================================================ */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "kern";
  /* Prevent iOS auto-resize on rotation */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Avoid horizontal scroll caused by clamp() overflows */
  overflow-x: clip;
}

/* Kill the blue tap-highlight on iOS; we draw our own :focus-visible. */
a, button, [role="button"], [tabindex] {
  -webkit-tap-highlight-color: transparent;
}

/* Treat any interactive element as a comfortable touch target by default.
   Override with min-height/width on dense lists if needed. */
button, a[role="button"], [role="button"], input[type="button"], input[type="submit"] {
  min-height: var(--touch-target-min);
}

::selection {
  background: rgba(0, 212, 255, 0.35);
  color: #fff;
}

/* ---- Headings ---- */
.t-hero, h1.hero {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 550;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
  text-wrap: balance;
}
.t-display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin: 0;
}
h1, .t-h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 600;
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-display);
  color: var(--text-primary);
  margin: 0;
  text-wrap: balance;
}
h2, .t-h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: var(--leading-h2);
  letter-spacing: var(--tracking-display);
  color: var(--text-primary);
  margin: 0;
  text-wrap: balance;
}
h3, .t-h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--leading-h3);
  letter-spacing: var(--tracking-body);
  color: var(--text-primary);
  margin: 0;
}
h4, .t-h4 {
  font-size: var(--text-h4);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

/* ---- Body text ---- */
.t-body-lg {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body);
  color: var(--text-secondary);
  font-weight: 400;
}
.t-body, p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0;
}
.t-body-sm {
  font-size: var(--text-body-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---- Mono / labels ---- */
.t-caption, code, .mono {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  line-height: var(--leading-mono);
  font-weight: 500;
  color: var(--text-tertiary);
}
.t-label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.t-section-number {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  color: var(--text-tertiary);
}

/* ---- Gradient text accent (use ONCE per surface) ---- */
.t-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- Focus ring ---- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* src/app/tokens-kit.css */
/* UI Kit — imports the design tokens from the design system root.
   Mobile-first overlay: defaults target 480px viewport; bigger at breakpoints. */
@import url("./tokens-base.css");

/* ─────────────────────────────────────────────────────────────
   Container & layout
   ───────────────────────────────────────────────────────────── */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left:  calc(var(--container-pad) + var(--safe-left));
  padding-right: calc(var(--container-pad) + var(--safe-right));
}

/* Section rhythm — vars adapt at breakpoints from colors_and_type.css */
.section { padding-top: var(--section-gap); padding-bottom: 0; }
.section--first { padding-top: 0; }
.section--end   { padding-bottom: var(--section-gap); }

/* Section number + heading two-column header — collapses to stack on mobile */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (min-width: 1024px) {
  .section-head {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 80px;
    margin-bottom: 64px;
  }
}

/* Hairlines */
.hairline { height: 1px; background: var(--border-subtle); width: 100%; }

/* ─────────────────────────────────────────────────────────────
   Motion
   ───────────────────────────────────────────────────────────── */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 600ms var(--ease-snap) forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; animation: none; }
}

/* ─────────────────────────────────────────────────────────────
   Buttons
   Comfortable touch targets on mobile (48px), tighter on desktop.
   ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--touch-target-cmf);     /* 48px default */
  min-height: var(--touch-target-cmf);
  padding: 0 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 150ms var(--ease-snap),
              background 200ms var(--ease-snap),
              border-color 200ms var(--ease-snap),
              color 200ms var(--ease-snap),
              box-shadow 200ms var(--ease-snap);
  white-space: nowrap;
  user-select: none;
  touch-action: manipulation;          /* removes 300ms tap delay */
}
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }   /* visible press feedback for touch */
.btn--primary    { background: #fff; color: #09090b; }
.btn--primary:hover { background: var(--brand-gradient); color: #09090b; box-shadow: var(--shadow-md); }
.btn--secondary  { background: transparent; color: var(--text-primary); border-color: var(--border-subtle); }
.btn--secondary:hover { background: var(--bg-elevated); border-color: var(--border-default); }
.btn--ghost      { background: transparent; color: var(--text-secondary); padding: 0 12px; }
.btn--ghost:hover { color: var(--text-primary); }

.btn--sm { height: var(--touch-target-min); min-height: var(--touch-target-min); padding: 0 14px; font-size: 13px; }
.btn--lg { height: var(--touch-target-lg); min-height: var(--touch-target-lg); padding: 0 28px; font-size: 16px; }

/* Full-width on mobile (utility) */
.btn--block { width: 100%; }
@media (min-width: 768px) {
  .btn--block-mobile-only { width: auto; }
}

/* Icon-only buttons — perfect square at the comfortable target */
.btn--icon {
  width: var(--touch-target-cmf);
  height: var(--touch-target-cmf);
  padding: 0;
}

/* ─────────────────────────────────────────────────────────────
   Tech tag (schematic chip)
   ───────────────────────────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 6px 9px;
  background: transparent;
  transition: color 100ms var(--ease-snap), border-color 100ms var(--ease-snap);
  white-space: nowrap;
}
.tag:hover, .tag:active { color: var(--text-primary); border-color: var(--border-default); }
.tag--active { color: var(--brand-cyan); border-color: rgba(0,212,255,0.3); }

/* ─────────────────────────────────────────────────────────────
   Card
   ───────────────────────────────────────────────────────────── */

.card-base {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color 200ms var(--ease-snap),
              transform 200ms var(--ease-snap);
}
@media (hover: hover) {
  .card-base:hover {
    border-color: var(--border-default);
    transform: translateY(-2px);
  }
}
.card-base:active { border-color: var(--border-default); }

/* ─────────────────────────────────────────────────────────────
   Anchors + base
   ───────────────────────────────────────────────────────────── */

a { color: inherit; text-decoration: none; cursor: pointer; }
@media (hover: hover) {
  a:hover { color: var(--text-primary); }
}

button { font-family: inherit; background: transparent; border: 0; }

/* Utility: visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Utility: stacked column on mobile, row on tablet+ */
.row-md-up { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) {
  .row-md-up { flex-direction: row; gap: 16px; }
}

/* Body lock for open drawer */
body.no-scroll { overflow: hidden; }

/* src/app/site.css */
/* Site-wide kit styles overrides — extras the kit-tokens don't cover. */

/* Smooth-scroll anchor jumps on the homepage (with nav offset). */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* Kit-style inputs shared with original UI kit. */
.cf-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-height: var(--touch-target-cmf);
  padding: 0 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px; /* prevents iOS auto-zoom */
  outline: none;
  transition: border-color 200ms var(--ease-snap), box-shadow 200ms var(--ease-snap);
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
textarea.cf-input { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.cf-input { padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; }
.cf-input::placeholder { color: var(--text-tertiary); }
.cf-input:focus { border-color: var(--brand-cyan); box-shadow: 0 0 0 2px rgba(0,212,255,0.18); }
@media (min-width: 768px) { .cf-input { font-size: 14px; min-height: 44px; } }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: #09090b;
  padding: 8px 12px; border-radius: 4px;
  z-index: 9999;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Card hover lift for all .card-base */
@media (hover: hover) {
  .card-base:hover { border-color: var(--border-default); }
}

/* CloudFloo generated brand surfaces. Tiles must repeat; art plates use cover. */
.brand-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.brand-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--brand-surface-image);
  background-repeat: repeat;
  background-size: var(--brand-surface-size, 560px 560px);
  opacity: 0.74;
  pointer-events: none;
}
.brand-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(80% 70% at 20% 0%, rgba(0,212,255,0.08), transparent 58%),
    linear-gradient(180deg, rgba(9,9,11,0.44), rgba(9,9,11,0.84));
  pointer-events: none;
}
.brand-surface > * {
  position: relative;
  z-index: 1;
}
.brand-surface--light {
  --text-primary: #09090b;
  --text-secondary: #3f3f46;
  --text-tertiary: #71717a;
  --border-subtle: rgba(9,9,11,0.10);
  --border-default: rgba(9,9,11,0.20);
  background: #f6f8fb;
  color: #09090b;
  border-color: rgba(9,9,11,0.10);
}
.brand-surface--light::before { opacity: 0.96; }
.brand-surface--light::after {
  background:
    radial-gradient(90% 70% at 15% 0%, rgba(0,212,255,0.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.48), rgba(255,255,255,0.82));
}
.brand-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: transform 200ms var(--ease-snap), border-color 200ms var(--ease-snap);
}
@media (hover: hover) {
  .brand-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-default);
  }
}
.brand-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  background-image: var(--brand-media-image);
  background-repeat: var(--brand-media-repeat, no-repeat);
  background-size: var(--brand-media-size, cover);
  background-position: center;
  min-height: 220px;
}
.brand-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 70% at 20% 10%, rgba(0,212,255,0.12), transparent 60%),
    linear-gradient(180deg, transparent, rgba(9,9,11,0.36));
  pointer-events: none;
}
.brand-media > * {
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .brand-card { padding: 32px; }
  .brand-media { min-height: 320px; }
}
