:root {
  --petrol: #172f40;
  --mint: #55d6be;
  --coral: #ff896f;
  --smoke: #f5f7f6;
  --muted: #566a77;
  --line: #dde4e1;
  --white: #fff;
  /* Derived tints (flat colors so text contrast is predictable): petrol text on each is >= 8.7:1 */
  --coral-soft: #ffe1db;
  --mint-soft: #d5f5ee;
  --mint-hover: #6ee0cb;
  --petrol-soft: #dce3e8;
  --petrol-wash: #c5cfd6;
  --petrol-2: #2b4150;
  --shadow: 0 4px 24px rgba(23, 47, 64, 0.1);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--smoke);
  color: var(--petrol);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--petrol); text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--coral); }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -48px; background: var(--petrol); color: var(--white); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header { padding: 12px 0; }
header img { display: block; height: 40px; width: auto; }
.bar { display: flex; align-items: center; justify-content: space-between; }
.bar-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; text-decoration: none; }
.bar-link:hover { text-decoration: underline; text-decoration-color: var(--coral); }
.logo { display: inline-flex; align-items: center; min-height: 44px; }

/* Hero */
.hero { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 64px; align-items: center; }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero h1 { margin: 0 0 20px; font-size: clamp(32px, 7.5vw, 52px); line-height: 1.1; letter-spacing: -0.025em; max-width: 16em; }
/* Coral is too light for text on this background (about 2.3:1), so it is the marker stroke, not the ink. */
.mark { background: linear-gradient(transparent 62%, rgba(255, 137, 111, 0.55) 62%); }
.lead { margin: 0 0 28px; max-width: 46ch; font-size: 19px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; margin: 0; }
.text-link { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.text-link:hover { text-decoration-color: var(--coral); }
.hero-art { display: none; }
.art-ring { stroke: var(--mint); }
.art-dot { fill: var(--coral); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  min-height: 48px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--petrol);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--mint-hover); transform: translateY(-1px); }
.button:active { transform: none; }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:hover { transform: none; } }

/* Sections: alternating bands give each block its own rhythm */
.section { padding: 56px 0; scroll-margin-top: 0; }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin: 0 0 12px; font-size: clamp(24px, 4.5vw, 32px); line-height: 1.2; letter-spacing: -0.015em; }
.section-sub { margin: 0 0 36px; max-width: 56ch; color: var(--muted); font-size: 17px; }

/* Value: plain text columns, no cards */
.features { display: grid; gap: 32px 40px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; }
.feature { border-top: 4px solid var(--mint); padding-top: 16px; }
.feature:nth-child(even) { border-top-color: var(--coral); }
.feature h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; max-width: 34ch; }

/* How it works: one connected sequence */
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 24px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; align-items: start; }
.step-n { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--petrol); color: var(--white); font-weight: 700; }
.steps h3 { margin: 8px 0 0; font-size: 18px; line-height: 1.3; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; max-width: 40ch; }

.trust { background: var(--petrol); color: var(--smoke); border-radius: 20px; padding: 32px 24px; }
.trust h2 { margin: 0 0 20px; font-size: clamp(24px, 4.5vw, 32px); line-height: 1.2; }
.trust ul { margin: 0 0 20px; padding-left: 20px; max-width: 62ch; }
.trust li { margin-bottom: 12px; }
.trust strong { color: var(--mint); }
.trust p { margin: 0; }
.trust a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mint); text-decoration-color: var(--coral); }
.trust a:hover { color: var(--white); }
.trust :focus-visible { outline-color: var(--mint); }

.closing { text-align: center; }
.closing h2 { margin: 0 0 8px; font-size: clamp(24px, 4.5vw, 32px); line-height: 1.2; }
.closing p { margin: 0 auto 24px; max-width: 40ch; color: var(--muted); font-size: 18px; }

footer { border-top: 1px solid var(--line); padding: 16px 0 28px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
footer a:hover { color: var(--petrol); text-decoration-color: var(--coral); }

/* Legal pages */
.legal { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; margin: 8px 0 56px; }
.legal h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.2; }
.legal h2 { margin: 28px 0 8px; font-size: 19px; }
.legal p, .legal li { color: var(--petrol-2); max-width: 68ch; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.legal code { background: var(--smoke); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
article.legal { max-width: 760px; margin-left: auto; margin-right: auto; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1fr auto; gap: 56px; padding-top: 56px; padding-bottom: 88px; }
  .hero-art { display: block; width: 220px; height: 220px; justify-self: end; }
  .section { padding: 88px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li { grid-template-columns: 1fr; gap: 8px; }
  .step-n { grid-row: auto; }
  .steps h3 { margin-top: 8px; }
  .trust { padding: 44px 48px; }
  .legal { padding: 40px 48px; }
}

/* Footer: same wording as the app footer (copyright left, "Hecho desde Ñuble" right) */
footer nav { flex-basis: 100%; order: 0; }
footer .foot-copy, footer .foot-made { order: 1; min-height: 44px; display: inline-flex; align-items: center; }
footer .foot-made { margin-left: auto; }
footer .heart { color: var(--coral); margin-left: 4px; }
