/* ==========================================================================
   SewaSync marketing site
   Hand-written CSS. No framework, no build step.
   Design tokens mirror packages/frontend/src/tailwind.css — keep in sync.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */
:root {
  --teal-50: #e6f7f6;
  --teal-100: #ccefed;
  --teal-200: #99dfdb;
  --teal-300: #66cfc9;
  --teal-500: #0d9488;
  --teal-600: #0a766d;
  --teal-700: #085952;
  --teal-900: #031e1b;

  --amber-50: #fff7e6;
  --amber-100: #fef0cc;
  --amber-500: #f59e0b;
  --amber-600: #c47e09;

  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f8fafc;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);

  --wrap: 1120px;
  --gutter: 1.25rem;
  --section-y: clamp(3.5rem, 8vw, 6.5rem);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* clears the sticky header on #anchor jumps */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal-600);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
}
h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}
h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

code {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- layout ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--alt {
  background: var(--surface-alt);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 0.75rem;
}

.lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal-600);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--primary {
  background: var(--teal-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--teal-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--teal-300);
  background: var(--teal-50);
}

.btn--light {
  background: #fff;
  color: var(--teal-700);
}

.btn--light:hover {
  background: var(--teal-50);
}

.btn--lg {
  padding: 0.95rem 1.7rem;
  font-size: 1.0625rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
}

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

.nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav__links a:hover,
.nav__links a[aria-current='page'] {
  color: var(--teal-600);
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}

/* --- hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: linear-gradient(180deg, var(--teal-50) 0%, #fff 100%);
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.hero__title {
  margin-bottom: 1rem;
}

.hero__accent {
  color: var(--teal-600);
}

.hero__lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero__note {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin: 1rem 0 0;
}

/* Illustrative "booking card" — pure CSS, no image weight. */
.preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  max-width: 30rem;
}

.preview__bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.preview__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.preview__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9375rem;
}

.preview__row:last-child {
  border-bottom: 0;
}

.preview__meta {
  color: var(--ink-faint);
  font-size: 0.8125rem;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill--ok {
  background: var(--teal-50);
  color: var(--teal-700);
}

.pill--warn {
  background: var(--amber-50);
  color: var(--amber-600);
}

/* --- cards / grids ------------------------------------------------------ */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.9375rem;
}

.card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-600);
  margin-bottom: 0.9rem;
}

.card__icon svg {
  width: 20px;
  height: 20px;
}

/* --- steps -------------------------------------------------------------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  padding-top: 2.75rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal-600);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.steps h3 {
  margin-bottom: 0.3rem;
}

.steps p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  margin: 0;
}

/* --- pricing ------------------------------------------------------------ */
.plans {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  align-items: start;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan--featured {
  border-color: var(--teal-300);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.plan__badge {
  position: absolute;
  top: -0.75rem;
  left: 1.75rem;
  background: var(--teal-600);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.plan__name {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.plan__tagline {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.plan__amount {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan__period {
  color: var(--ink-faint);
  font-size: 0.9375rem;
}

.plan__terms {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.plan__features {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9375rem;
  flex: 1;
}

.plan__features li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--ink-soft);
}

.plan__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--teal-500);
  border-bottom: 2px solid var(--teal-500);
  transform: rotate(-45deg);
}

.plan__features li strong {
  color: var(--ink);
}

/* --- table -------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 34rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--surface-alt);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:not(:first-child),
th:not(:first-child) {
  text-align: center;
}

/* --- callouts ----------------------------------------------------------- */
.callout {
  border-left: 4px solid var(--amber-500);
  background: var(--amber-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem;
  font-size: 0.9375rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* --- FAQ ---------------------------------------------------------------- */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
  margin-inline: auto;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 1.25rem;
}

.faq details[open] {
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1.1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

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

.faq summary::after {
  content: '+';
  font-size: 1.35rem;
  color: var(--teal-600);
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: '\2212'; /* minus sign */
}

.faq details > p {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* --- CTA band ----------------------------------------------------------- */
.cta {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.25rem);
  text-align: center;
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 34rem;
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.cta .btn-row {
  justify-content: center;
}

/* --- footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
  padding-block: 3rem 2rem;
  font-size: 0.9375rem;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-size: 0.8125rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal-600);
  text-decoration: underline;
}

.site-footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.875rem;
}

.site-footer__bottom p {
  margin: 0;
}

/* --- 404 ---------------------------------------------------------------- */
.error-page {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding-block: 4rem;
}

.error-code {
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 800;
  color: var(--teal-200);
  line-height: 1;
  margin: 0;
}

/* --- desktop ------------------------------------------------------------ */
@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* --- mobile nav ---------------------------------------------------------
   Progressive enhancement: the collapsed menu only exists when JS is on
   (`html.js`, set by an inline script in <head>). Without JS the links simply
   stack under the brand and remain reachable.
   ------------------------------------------------------------------------ */
@media (max-width: 59.99rem) {
  .js .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .js .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem;
    box-shadow: var(--shadow);
    display: none;
  }

  .js .site-header[data-nav-open='true'] .nav {
    display: flex;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav__links {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }
}

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