/* Inkword — shared design tokens (exact palette).
   Ink on paper: one indigo hue at several lightnesses, on a warm paper ground.
   Every pair below is verified >= 4.5:1 (WCAG AA). */
:root {
  --primary: #4f46e5;
  --on-primary: #ffffff;
  --primary-dark: #3f37c9;
  --primary-tint: #e5e3f7;
  --primary-faint: #efeefa;
  --secondary: #6265ef;
  --on-secondary: #ffffff;
  --background: #faf8f3;
  --foreground: #1e1b4b;
  --card: #fffdf9;
  --card-foreground: #1e1b4b;
  --muted: #efedf7;
  --muted-foreground: #5f5b7d;
  --border: #dad6ec;
  --destructive: #dc2626;
  --on-destructive: #ffffff;
  --ring: #4f46e5;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Nunito Sans", sans-serif;
  --radius: 10px;
  --max-width: 1024px;
  --nav-height: 64px;
  --soft-press: 200ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(79, 70, 229, 0.09), transparent 55%);
  background-attachment: fixed;
}

h1,
h2,
h3,
h4,
.brand,
.heading {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}

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

a {
  color: var(--primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* ——— Navbar ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
  gap: 1rem;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--foreground);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 44px;
}

.navbar-brand__mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.navbar-cta {
  text-decoration: none;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--soft-press) ease,
    background-color var(--soft-press) ease,
    border-color var(--soft-press) ease,
    box-shadow var(--soft-press) ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.btn--primary:hover:not(:disabled) {
  background: #4338ca;
  border-color: #4338ca;
}

.btn--secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--secondary:hover:not(:disabled) {
  background: rgba(79, 70, 229, 0.08);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  padding: 2.5rem 0 1.5rem;
  overflow: hidden;
}

.hero__plane {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(79, 70, 229, 0.08) 0%, transparent 45%),
    linear-gradient(200deg, rgba(79, 70, 229, 0.05) 0%, transparent 40%);
}

.hero__layout {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: end;
}

@media (min-width: 860px) {
  .hero__layout {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 2.5rem;
    min-height: calc(100vh - var(--nav-height) - 3rem);
    max-height: 820px;
  }
}

.hero__brand {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 600;
  color: var(--foreground);
}

.hero__subtitle {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: var(--muted-foreground);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__visual {
  position: relative;
  width: 100%;
  border-radius: 0;
  /* full-bleed feel within column — edge-to-edge mock plane */
}

.hero__visual svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(30, 27, 75, 0.12));
}

.hero-mock__word {
  animation: pulse-word 2.8s ease-in-out infinite;
}

.hero-mock__scan {
  animation: scan-line 3.2s ease-in-out infinite;
}

@keyframes pulse-word {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@keyframes scan-line {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(48px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ——— Sections ——— */
.section {
  padding: 3rem 0;
}

.section__header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.section__header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
}

.section__header p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--muted-foreground);
}

/* Bento feature grid */
.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(140px, auto);
  }

  .bento__item:nth-child(1) {
    grid-column: span 4;
    grid-row: span 1;
  }

  .bento__item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento__item:nth-child(3) {
    grid-column: span 2;
  }

  .bento__item:nth-child(4) {
    grid-column: span 2;
  }

  .bento__item:nth-child(5) {
    grid-column: span 4;
  }
}

.bento__item {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform var(--soft-press) ease;
}

.bento__item:hover {
  transform: translateY(-2px);
}

.bento__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--primary);
}

.bento__item p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.bento__item--accent {
  background: linear-gradient(145deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--on-primary);
  border-color: transparent;
}

.bento__item--accent .bento__icon {
  color: var(--on-primary);
}

.bento__item--warm {
  background: linear-gradient(160deg, var(--primary-faint) 0%, var(--card) 60%);
  border-color: var(--primary-tint);
}

/* ——— Signup ——— */
.signup {
  padding: 2.5rem 0 4rem;
}

.signup__panel {
  width: min(100%, 520px);
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 2rem 1.75rem;
  box-shadow: 0 12px 40px rgba(30, 27, 75, 0.06);
}

.signup__panel h2 {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
  text-align: center;
}

.signup__panel > p {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.98rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-field input,
.form-field select {
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--foreground);
  background: var(--card);
  width: 100%;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--primary);
}

.form-field .error {
  display: none;
  color: var(--destructive);
  font-size: 0.875rem;
  margin: 0;
}

.form-field.is-invalid .error {
  display: block;
}

.form-field.is-invalid input,
.form-field.is-invalid select {
  border-color: var(--destructive);
}

.signup__submit {
  width: 100%;
  margin-top: 0.25rem;
}

.signup__fineprint {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
  color: var(--muted-foreground);
}

.form-success {
  display: none;
  text-align: center;
  padding: 1rem 0 0.25rem;
}

.form-success.is-visible {
  display: block;
}

.form-success p {
  margin: 0;
  font-weight: 600;
  color: var(--foreground);
}

.signup-form.is-hidden {
  display: none;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 253, 249, 0.55);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-copy {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:active:not(:disabled),
  .bento__item:hover {
    transform: none;
  }
}
