/*
 * InvoicingPro — pre-launch landing page styles.
 *
 * Hand-written CSS that mirrors the real Next.js landing page (Tailwind v4 +
 * shadcn/ui "new-york"). The design tokens below are copied verbatim from the
 * app's globals.css (:root light theme) so the colors, radii, and fonts match.
 */

/* ---- Design tokens (from frontend/src/app/globals.css) ---- */
:root {
  --radius: 0.625rem;
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: 1rem;

  --background: oklch(1 0 0);
  --foreground: oklch(0.129 0.042 264.695);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.129 0.042 264.695);
  --primary: oklch(0.208 0.042 265.755);
  --primary-foreground: oklch(0.984 0.003 247.858);
  --secondary: oklch(0.968 0.007 247.896);
  --secondary-foreground: oklch(0.208 0.042 265.755);
  --muted-foreground: oklch(0.554 0.046 257.417);
  --accent: oklch(0.968 0.007 247.896);
  --accent-foreground: oklch(0.208 0.042 265.755);
  --border: oklch(0.929 0.013 255.508);
  --input: oklch(0.929 0.013 255.508);
  --ring: oklch(0.704 0.04 256.788);

  /* Tailwind default shadow scale */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Sora", "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* ---- Base / reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--border);
}

* {
  outline-color: color-mix(in oklch, var(--ring) 50%, transparent);
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
}

.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;
}

/* ---- Layout primitives ---- */
.page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 72rem; /* max-w-6xl */
  margin-inline: auto;
  padding-inline: 1rem; /* px-4 */
}

.site-main {
  flex: 1 1 auto;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ---- Buttons (shadcn/ui Button) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  height: 2.25rem; /* h-9 */
  padding-inline: 1rem; /* px-4 */
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent);
}

.btn .icon {
  width: 1rem;
  height: 1rem;
}

.btn-lg {
  height: 2.5rem; /* h-10 */
  padding-inline: 1.5rem; /* px-6 */
  border-radius: var(--radius-md);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background-color: color-mix(in oklch, var(--primary) 90%, transparent);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background-color: color-mix(in oklch, var(--secondary) 80%, transparent);
}

.btn-outline {
  border: 1px solid var(--border);
  background-color: var(--background);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  height: 4rem; /* h-16 */
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; /* size-8 */
  height: 2rem;
  border-radius: var(--radius-lg);
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}

.icon-logo {
  width: 1.125rem; /* size-4.5 */
  height: 1.125rem;
}

.logo-word {
  font-family: var(--font-display);
  font-size: 1.125rem; /* text-lg */
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-glow {
  pointer-events: none;
  position: absolute;
  top: -6rem; /* -top-24 */
  left: 50%;
  width: 40rem;
  height: 40rem;
  transform: translateX(-50%);
  border-radius: 9999px;
  background-color: color-mix(in oklch, var(--primary) 5%, transparent);
  filter: blur(64px); /* blur-3xl */
}

.hero-inner {
  position: relative;
  padding-block: 5rem; /* py-20 */
}

.hero-content {
  max-width: 48rem; /* max-w-3xl */
  margin-inline: auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.25rem 0.75rem; /* py-1 px-3 */
  font-size: 0.875rem;
  font-weight: 500;
}

.icon-badge {
  width: 0.875rem; /* size-3.5 */
  height: 0.875rem;
}

.hero-title {
  margin-top: 1.5rem;
  font-size: 2.25rem; /* text-4xl */
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

.hero-subtitle {
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: 1.125rem; /* text-lg */
  text-wrap: pretty;
}

/* ---- Notify form ---- */
.notify {
  margin-top: 2.5rem;
}

.notify-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 30rem;
  margin-inline: auto;
}

.input {
  height: 2.5rem;
  width: 100%;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background-color: var(--background);
  color: var(--foreground);
  padding-inline: 0.875rem;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 40%, transparent);
}

.notify-form .btn {
  width: 100%;
}

.notify-hint {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.notify-status {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.notify-status[data-state="success"] {
  color: var(--foreground);
}

.notify-status[data-state="error"] {
  color: oklch(0.577 0.245 27.325); /* destructive */
}

/* ---- Generic section ---- */
.section {
  padding-block: 5rem; /* py-20 */
}

.section-bordered {
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 42rem; /* max-w-2xl */
  margin-inline: auto;
  text-align: center;
}

.section-title {
  font-size: 1.875rem; /* text-3xl */
  font-weight: 700;
  line-height: 1.2;
}

.section-lead {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.section-title-left,
.section-lead-left {
  text-align: left;
}

/* ---- Features ---- */
.feature-grid {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem; /* size-11 */
  height: 2.75rem;
  border-radius: var(--radius-lg);
  background-color: color-mix(in oklch, var(--primary) 10%, transparent);
  color: var(--primary);
}

.icon-feature {
  width: 1.375rem; /* size-5.5 */
  height: 1.375rem;
}

.feature-title {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.feature-text {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.625;
}

/* ---- How it works ---- */
.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
}

.step-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
  width: 1.5rem; /* size-6 */
  height: 1.5rem;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 600;
}

.why-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.why-label {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.why-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.icon-check {
  width: 1.25rem; /* size-5 */
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  color: var(--primary);
}

/* ---- Closing CTA ---- */
.cta {
  position: relative;
  overflow: hidden;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius-2xl);
  padding: 3.5rem 1.5rem; /* py-14 px-6 */
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.cta-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.cta-text {
  max-width: 36rem;
  margin: 1rem auto 0;
  font-size: 1.125rem;
  color: color-mix(in oklch, var(--primary-foreground) 80%, transparent);
}

.cta-actions {
  margin-top: 2rem;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem; /* py-8 */
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-link {
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--foreground);
}

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .container {
    padding-inline: 1.5rem; /* sm:px-6 */
  }

  .hero-inner {
    padding-block: 7rem; /* sm:py-28 */
  }

  .hero-title {
    font-size: 3rem; /* sm:text-5xl */
  }

  .hero-subtitle {
    font-size: 1.25rem; /* sm:text-xl */
  }

  .section-title,
  .cta-title {
    font-size: 2.25rem; /* sm:text-4xl */
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .notify-form {
    flex-direction: row;
  }

  .notify-form .input {
    flex: 1 1 auto;
  }

  .notify-form .btn {
    width: auto;
  }

  .footer-inner {
    flex-direction: row;
  }

  .cta {
    padding-inline: 3rem; /* sm:px-12 */
  }
}

@media (min-width: 1024px) {
  .hero-inner {
    padding-block: 8rem; /* lg:py-32 */
  }

  .hero-title {
    font-size: 3.75rem; /* lg:text-6xl */
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .how-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
