/* ==========================================================================
   Tile Pad landing — bright editorial theme
   ========================================================================== */

/* Self-hosted fonts (SIL Open Font License). Served from same-origin so
   the page makes zero third-party requests, consistent with the "nothing
   leaves your browser" promise. Latin subsets only. */

/* IBM Plex Sans — variable font with wght axis 100–700. Handles both
   display (headlines) and body copy on this page. One block, one file,
   browser picks the right weight off the axis. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surface palette — bright, modern, off-white with a slight cool
     tint. Cards sit on pure white for gentle elevation, alt sections
     on a faintly darker cool gray to create rhythm. */
  --bg: #fbfcff;
  --bg-elevated: #ffffff;
  --bg-subtle: #f2f4fb;
  --border: #e2e5ef;
  --border-strong: #c7ccdc;

  /* Text — contrast ratios against --bg (#fbfcff):
     --text        ~17:1  (primary headings and body)
     --text-muted  ~7:1   (secondary captions, descriptions)
     --text-dim    ~5:1   (tertiary metadata — only safe on --bg;
                           drops to 4.4:1 against --bg-subtle which
                           fails AA at small sizes, so use
                           --text-muted on darker surfaces) */
  --text: #0f1222;
  --text-muted: #53586a;
  --text-dim: #6b7186;

  /* Accent — crisp indigo-violet that reads well on a light surface */
  --accent: #5b5cff;
  --accent-hover: #4346e0;
  --accent-soft: #eef0ff;
  --accent-glow: rgba(91, 92, 255, 0.12);
  --accent-glow-strong: rgba(91, 92, 255, 0.22);

  /* Elevation shadows — used in place of dark theme's heavy borders.
     Doubling up a tight-and-sharp shadow with a soft-and-spread one
     reads as naturally lit on a bright surface. */
  --shadow-sm: 0 1px 2px rgba(15, 18, 34, 0.04),
               0 2px 8px rgba(15, 18, 34, 0.03);
  --shadow-md: 0 2px 4px rgba(15, 18, 34, 0.05),
               0 12px 32px rgba(15, 18, 34, 0.06);
  --shadow-lg: 0 12px 24px rgba(15, 18, 34, 0.06),
               0 32px 64px rgba(15, 18, 34, 0.10);

  /* Typography — IBM Plex Sans covers both display and body roles;
     the --font-display variable is kept so individual elements can
     opt back into a distinct display face later without touching
     every rule. */
  --font-display: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Layout */
  --max-width: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Soft ambient color field — two very large, very soft blobs pinned
   to the page backdrop. Reads as natural light from above-left on an
   otherwise-plain surface. No noise texture; the bright theme stays
   clean. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      1200px 600px at 10% -10%,
      rgba(91, 92, 255, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      1000px 500px at 95% 5%,
      rgba(167, 139, 250, 0.06) 0%,
      transparent 55%
    );
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Keyboard focus — visible high-contrast ring on every interactive
   element. The default browser focus ring is nearly invisible on the
   near-black background. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
.btn:focus-visible {
  outline-offset: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 0.78em;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 1px 0 var(--border);
}

/* ==========================================================================
   Layout container
   ========================================================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

section {
  padding: 96px 0;
  position: relative;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(32px, 4.5vw, 52px);
  max-width: 18ch;
  margin-bottom: 48px;
}

/* Highlighted word inside a headline. Same serif face, accent color,
   no italic. */
.accent-word {
  color: var(--accent);
  font-style: normal;
  font-family: var(--font-display);
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
}

.nav__brand:hover {
  color: var(--text);
}

.nav__brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
}

.nav__links a {
  color: var(--text-muted);
}

.nav__links a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav__links {
    gap: 18px;
    font-size: 13px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}

/* Soft, wide accent glow behind the hero. Reads like light pooling
   under the headline without the "spotlight" effect a dark theme
   needs. */
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  width: 1200px;
  height: 700px;
  background: radial-gradient(
    ellipse at center,
    rgba(91, 92, 255, 0.10) 0%,
    rgba(167, 139, 250, 0.06) 35%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}

.hero__inner {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: hero-fade-in 1.2s cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero__title {
  font-size: clamp(46px, 7.5vw, 92px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}

.hero__subtitle {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.hero__subtitle--secondary {
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--text-dim);
  margin-bottom: 44px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(91, 92, 255, 0.20),
              0 10px 24px -8px rgba(91, 92, 255, 0.40);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(91, 92, 255, 0.25),
              0 16px 36px -10px rgba(91, 92, 255, 0.45);
}

/* aria-disabled keeps the button in the tab order so screen-reader
   and keyboard users can discover it. pointer-events blocks clicks;
   the focus ring paints regardless and needs no override. */
.btn--primary[aria-disabled="true"] {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

.btn--primary[aria-disabled="true"]:hover {
  transform: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.btn--primary[aria-disabled="true"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.btn--ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Features
   ========================================================================== */

.features {
  /* No top border — shadows carry the elevation now */
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1),
              border-color 0.2s ease,
              transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 22px;
  transition: background 0.25s ease, color 0.25s ease,
              border-color 0.25s ease;
}

.feature:hover .feature__icon {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.feature__title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature__body {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

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

@media (max-width: 640px) {
  .features__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ==========================================================================
   How it works
   ========================================================================== */

.how {
  background: var(--bg-subtle);
}

.how__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.how__step {
  padding: 36px 32px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.how__step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.22;
  position: absolute;
  top: 18px;
  right: 28px;
  font-style: normal;
}

.how__step h3 {
  font-size: 24px;
  margin-bottom: 12px;
  max-width: 14ch;
}

.how__step p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 1024px) {
  .how__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Screenshots
   ========================================================================== */

.shots__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.shot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  padding: 14px 14px 0;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1),
              box-shadow 0.3s ease,
              border-color 0.2s ease;
}

.shot a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.shot:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.shot img {
  width: 100%;
  height: auto;
  display: block;
}

.shot figcaption {
  padding: 18px 8px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.shot figcaption strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.shot--wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .shots__grid {
    grid-template-columns: 1fr;
  }
  .shot--wide {
    grid-column: auto;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
  /* Plain white section */
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 28px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), color 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item__body {
  padding: 0 26px 26px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 62ch;
}

.faq-item__body a {
  border-bottom: 1px solid currentColor;
}

/* ==========================================================================
   Privacy callout
   ========================================================================== */

.callout {
  background: linear-gradient(
    180deg,
    var(--accent-soft) 0%,
    var(--bg) 100%
  );
  position: relative;
  overflow: hidden;
}

.callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 800px 400px at center top,
    rgba(91, 92, 255, 0.12) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.callout__inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.callout__title {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  margin-bottom: 20px;
}

.callout__body {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 36px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 13px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-muted);
}

.footer__brand img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.footer__links {
  display: flex;
  gap: 28px;
}

.footer__links a {
  color: var(--text-muted);
}

.footer__links a:hover {
  color: var(--text);
}

.footer__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Privacy page specifics
   ========================================================================== */

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.prose h1 {
  font-size: clamp(36px, 5vw, 60px);
  margin-bottom: 8px;
}

.prose h2 {
  font-size: 28px;
  margin-top: 56px;
  margin-bottom: 16px;
}

.prose h3 {
  font-size: 20px;
  margin-top: 36px;
  margin-bottom: 12px;
}

.prose p, .prose ul {
  color: var(--text-muted);
  margin: 0 0 18px;
}

.prose ul {
  padding-left: 20px;
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose .updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 32px;
  display: block;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 14px;
}

.prose th, .prose td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 500;
}

.prose td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.back-link:hover {
  color: var(--accent);
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Mobile polish
   ========================================================================== */

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  section    { padding: 64px 0; }
  .hero      { padding: 72px 0 64px; }
  .hero__cta { margin-bottom: 56px; }
  .nav__inner { padding: 14px 20px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
