/* Gabaritero marketing site.
   Colours, radii and the Caudex face are copied from the app theme
   (src/theme.tsx in gabaritero-web) so the site and the app look like one
   product. No framework, no build step: this file is served as written. */

@font-face {
  font-family: 'Caudex';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/caudex-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Caudex';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/caudex-700.woff2') format('woff2');
}

:root {
  --brand: #305d9c;
  --brand-ink: #faf8f5;
  --accent: #3c8d51;
  /* Dark amber, not the app's #f4a72b: on this light background the badge text
     needs 4.5:1 and the app's warning tone lands at 3.4:1. */
  --warn: #7d4705;
  --bg: #f2efe9;
  --paper: #faf8f5;
  --ink: #212121;
  --muted: #636e72;
  --line: rgba(0, 0, 0, 0.09);
  --shadow: 0 1px 2px rgba(33, 33, 33, 0.06), 0 8px 24px rgba(33, 33, 33, 0.06);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4c8ce6;
    --brand-ink: #222222;
    --accent: #59bf73;
    --warn: #f4a72b;
    --bg: #222222;
    --paper: #2a2a2a;
    --ink: #dedede;
    --muted: #9e9e9e;
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Caudex', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-top: 0;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--brand-ink);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 20;
}

.skip:focus {
  left: 0;
}

.wrap {
  width: min(1080px, 100% - 40px);
  margin: 0 auto;
}

/* Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav a[aria-current='page'] {
  color: var(--brand);
  font-weight: 700;
}

.lang {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
  text-decoration: none;
}

/* Badges and buttons -------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}

/* Hero --------------------------------------------------------------- */

.hero {
  padding: 56px 0 40px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
}

.small-note {
  font-size: 1rem;
  color: var(--muted);
  max-width: 46ch;
}

.hero-art {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(33, 33, 33, 0.14));
}

/* Sections and cards -------------------------------------------------- */

section {
  padding: 34px 0;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 22px;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.steps li {
  counter-increment: step;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 22px 62px;
  position: relative;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.steps strong {
  display: block;
  margin-bottom: 4px;
}

.steps span {
  color: var(--muted);
}

/* Feature list -------------------------------------------------------- */

.feature-list {
  display: grid;
  gap: 28px;
}

.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.feature ul {
  margin-bottom: 0;
}

.feature p:last-child,
.feature ul:last-child {
  margin-bottom: 0;
}

/* Panels and tables --------------------------------------------------- */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel h2 {
  font-size: 1.25rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

caption {
  text-align: left;
  color: var(--muted);
  padding: 0 0 10px;
  font-size: 0.95rem;
}

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

thead th {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

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

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
}

/* Footer -------------------------------------------------------------- */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
}

/* Small screens ------------------------------------------------------- */

@media (max-width: 820px) {
  .hero {
    padding-top: 36px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-art {
    max-width: 420px;
    margin: 0 auto;
  }

  .site-header .wrap {
    min-height: 56px;
  }
}
