/* Homio — shared styles. Palette mirrors AppPalette in lib/core/theme.dart. */

:root {
  --primary: #0D6E56;
  --primary-dark: #08503F;
  --primary-soft: #E2F2ED;
  --accent: #E2703A;
  --accent-soft: #FCEDE4;
  --scaffold: #FBFAF7;
  --surface: #FFFFFF;
  --field: #F1F0EA;
  --ink: #11201B;
  --ink-soft: #67736E;
  --line: #E5E3DB;
  --success: #15916B;
  --radius: 20px;
  --max: 1080px;
  --prose: 860px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--scaffold);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ------------------------------------------------------------- header */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.glyph {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--primary);
  display: grid; place-items: center;
  flex: none;
}

.brand span {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: var(--ink);
}

nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }

nav a {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 30px;
  transition: background .18s, color .18s;
}

nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
nav a.here { background: var(--primary-soft); color: var(--primary-dark); }

/* --------------------------------------------------------------- type */
h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -1.8px;
  font-weight: 800;
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  letter-spacing: -0.8px;
  font-weight: 800;
  margin: 0 0 8px;
}

h3 {
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 26px 0 8px;
}

p { margin: 0 0 14px; }

.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 8px;
}

.stamp { font-size: 0.84rem; color: var(--ink-soft); }

.muted { color: var(--ink-soft); }

/* -------------------------------------------------------------- pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(226, 112, 58, 0.35);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.pill::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ------------------------------------------------------------ layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.prose { max-width: var(--prose); }

section { padding: 56px 0; }
section.tight { padding: 36px 0; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* -------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.card.tinted { background: var(--primary-soft); border-color: rgba(13, 110, 86, 0.18); }
.card.warn { background: var(--accent-soft); border-color: rgba(226, 112, 58, 0.3); }

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

.icon {
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- lists */
ul.dots { margin: 0 0 16px; padding-left: 0; list-style: none; }

ul.dots li { position: relative; padding-left: 20px; margin-bottom: 8px; }

ul.dots li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(13, 110, 86, 0.55);
}

/* -------------------------------------------------------------- steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 50px;
  margin-bottom: 22px;
}

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

.steps strong { display: block; margin-bottom: 2px; }
.steps li p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* -------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; margin: 18px 0; }

table { width: 100%; border-collapse: collapse; min-width: 460px; font-size: 0.94rem; }

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

th { background: var(--field); font-weight: 800; font-size: 0.86rem; }

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

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 14px;
  transition: background .18s, transform .12s;
}

.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn.clay { background: var(--accent); }
.btn.clay:hover { background: #c85f2c; }

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

.btn.ghost:hover { background: var(--field); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* -------------------------------------------------------------- price */
.price {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1.1;
}

.price small { font-size: 0.95rem; font-weight: 700; color: var(--ink-soft); }

/* ------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); background: var(--surface); }

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 22px 34px;
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  font-size: 0.9rem;
}

.foot h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.foot a { display: block; color: var(--ink); text-decoration: none; margin-bottom: 8px; }
.foot a:hover { color: var(--primary); }

.foot-base {
  border-top: 1px solid var(--line);
  padding: 18px 22px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 620px) {
  section { padding: 40px 0; }
  .card { padding: 20px; }
  nav { width: 100%; margin-left: 0; }
  nav a { padding: 7px 10px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #4FD1A5;
    --primary-dark: #8AE9C6;
    --primary-soft: #12332B;
    --accent: #F08A57;
    --accent-soft: #3A2317;
    --scaffold: #0D1210;
    --surface: #161D1A;
    --field: #1F2724;
    --ink: #ECF1EE;
    --ink-soft: #94A09B;
    --line: #2A3330;
    --success: #41C99A;
  }
  header { background: rgba(13, 18, 16, 0.9); }
  .btn { color: #0D1210; }
  .btn.ghost { color: var(--ink); }
}
