/* Miga website. Colours of the app's "Huerta" (Garden) theme; no fonts or scripts from third parties. */

:root {
  color-scheme: dark;
  --bg: #0f1310;
  --surface: #161b17;
  --surface-high: #1d241f;
  --surface-higher: #263029;
  --outline: #333d36;
  --text: #e5eae6;
  --muted: #a7b0aa;
  --primary: #6bbf93;
  --primary-strong: #8fd3ad;
  --on-primary: #0b1a12;
  --primary-container: #1f3a2b;
  --on-primary-container: #cdeedb;
  --accent: #e08a66;
  --accent-container: #3d2419;
  --sage: #8fa588;
  --glow: rgb(107 191 147 / 22%);
  --shadow: 0 24px 60px -20px rgb(0 0 0 / 70%);
  --radius: 28px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-high: #edf0ea;
  --surface-higher: #e1e5de;
  --outline: #d4d9d2;
  --text: #1d2520;
  --muted: #5a645e;
  --primary: #2f7a57;
  --primary-strong: #24654a;
  --on-primary: #ffffff;
  --primary-container: #d3ebdd;
  --on-primary-container: #12321f;
  --accent: #c1633d;
  --accent-container: #f5dfd4;
  --sage: #6e7f68;
  --glow: rgb(47 122 87 / 16%);
  --shadow: 0 24px 60px -24px rgb(29 37 32 / 35%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-high); padding: 2px 6px; border-radius: 6px; }
pre { font-family: var(--mono); font-size: 14px; background: var(--surface); border: 1px solid var(--outline); border-radius: 18px; padding: 18px 20px; overflow-x: auto; line-height: 1.55; margin: 0; }
pre code { background: none; padding: 0; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Buttons and chips --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; border: 1.5px solid var(--outline); color: var(--text);
  background: transparent; cursor: pointer; transition: transform .2s cubic-bezier(.2, 0, 0, 1), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 10px 30px -10px var(--glow); }
.btn.primary:hover { background: var(--primary-strong); }
.btn.small { height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn svg.i { width: 20px; height: 20px; }
.btn[aria-disabled="true"] { cursor: default; opacity: .85; }
.btn[aria-disabled="true"]:hover { transform: none; border-color: var(--outline); }
.btn .soon { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-container); color: var(--accent); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface-high); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip.outline { background: transparent; border: 1.5px solid var(--outline); }
.chip.primary { background: var(--primary-container); color: var(--on-primary-container); }
.chip.accent { background: var(--accent-container); color: var(--accent); }

/* --- Navigation --- */
.nav {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--outline) 60%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 6px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 4px 14px -4px rgb(0 0 0 / 50%); }
.brand b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.nav-links a:hover { color: var(--text); background: var(--surface-high); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: none; font: 700 13px var(--font); }
.icon-btn:hover { background: var(--surface-high); color: var(--text); }
.icon-btn svg.i { width: 20px; height: 20px; }
.menu-toggle { display: none; }
@media (max-width: 920px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 10px 20px 18px; background: var(--bg); border-bottom: 1px solid var(--outline); }
  .nav.open .nav-links { display: flex; }
  .menu-toggle { display: inline-grid; }
  .nav .cta-label { display: none; }
}

/* --- Hero --- */
.hero { position: relative; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 700px; z-index: -1;
  background: radial-gradient(600px 380px at 75% 30%, var(--glow), transparent 70%), radial-gradient(500px 320px at 15% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: 850; margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-phones { position: relative; height: 640px; perspective: 1400px; }
.phone {
  position: absolute; width: 290px; border-radius: 40px; padding: 10px; background: #0a0d0b;
  box-shadow: var(--shadow), 0 0 0 1.5px #2a312c inset; transition: transform .7s cubic-bezier(.2, 0, 0, 1);
}
.phone img { border-radius: 31px; width: 100%; }
.hero-phones .phone.front { right: 40px; top: 10px; transform: rotateY(-16deg) rotateX(8deg) rotateZ(1deg); z-index: 2; }
.hero-phones .phone.back { right: 250px; top: 70px; transform: rotateY(-16deg) rotateX(8deg) rotateZ(1deg) scale(.88); opacity: .9; }
.hero-phones:hover .phone.front { transform: rotateY(-4deg) rotateX(2deg) scale(1.03); }
.hero-phones:hover .phone.back { transform: rotateY(-4deg) rotateX(2deg) scale(.86) translateX(-20px); }
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-phones { height: 500px; max-width: 460px; width: 100%; margin: 0 auto; }
  .hero-phones .phone { width: 210px; }
  .hero-phones .phone.front { right: 2%; }
  .hero-phones .phone.back { right: auto; left: 2%; }
}

/* --- Marquee --- */
.marquee { overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; gap: 14px; animation: marquee 48s linear infinite; padding-right: 14px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .chip { font-size: 17px; padding: 12px 22px; background: var(--surface); border: 1px solid var(--outline); transition: transform .25s, background .25s; }
.marquee .chip:hover { transform: translateY(-3px); background: var(--primary-container); color: var(--on-primary-container); }
.marquee .chip svg.i { width: 20px; height: 20px; color: var(--primary); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Wavy divider --- */
.wavy {
  height: 8px; margin: 72px 0; background: var(--primary); opacity: .9;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 20" xmlns="http://www.w3.org/2000/svg"><path d="M0 10 Q 25 20, 50 10 T 100 10" fill="none" stroke="black" stroke-width="6"/></svg>') repeat-x 0 0 / 32px 100%;
  mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 20" xmlns="http://www.w3.org/2000/svg"><path d="M0 10 Q 25 20, 50 10 T 100 10" fill="none" stroke="black" stroke-width="6"/></svg>') repeat-x 0 0 / 32px 100%;
  animation: wave 2.4s linear infinite;
}
@keyframes wave { to { -webkit-mask-position: 32px 0; mask-position: 32px 0; } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .wavy { animation: none; }
  .phone, .card { transition: none; }
}

/* --- Sections --- */
section { position: relative; }
.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.section-head .chip { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.12rem; margin-top: 14px; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pillar { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--outline); }
.pillar svg.i { width: 26px; height: 26px; color: var(--primary); }
.pillar h3 { font-size: 1.08rem; margin: 12px 0 6px; }
.pillar p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }

/* --- Showcase --- */
.picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.picker button {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--outline); background: var(--surface); color: var(--text); font: 600 15px var(--font);
  transition: transform .2s, border-color .2s, background .2s;
}
.picker button:hover { transform: translateY(-2px); border-color: var(--primary); }
.picker button[aria-selected="true"] { background: linear-gradient(135deg, var(--primary), var(--sage)); color: var(--on-primary); border-color: transparent; box-shadow: 0 10px 26px -12px var(--glow); }
.picker button svg.i { width: 18px; height: 18px; }
.showcase-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 44px;
  border-radius: 36px; background: var(--surface); border: 1px solid var(--outline);
}
.showcase-card .kicker { margin-bottom: 12px; }
.showcase-card h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; }
.showcase-card p.desc { color: var(--muted); margin: 16px 0 22px; font-size: 1.06rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li svg.i { width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.checks li b { color: var(--text); }
.checks li span { color: var(--muted); }
.showcase-media { display: flex; justify-content: center; }
.showcase-media .phone { position: relative; width: 300px; }
.showcase-panel[hidden] { display: none; }
.showcase-panel { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 860px) {
  .showcase-card { grid-template-columns: 1fr; padding: 26px; }
  .showcase-media .phone { width: 250px; }
}

/* --- Feature cards --- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--outline);
  transition: transform .3s cubic-bezier(.2, 0, 0, 1), box-shadow .3s, background .3s;
}
.card:hover { transform: translateY(-6px); background: var(--surface-high); box-shadow: var(--shadow); }
.card h3 { font-size: 1.2rem; margin: 18px 0 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card ul { color: var(--muted); font-size: 15px; padding-left: 18px; margin: 12px 0 0; }
.card li + li { margin-top: 4px; }
.icon-circle { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-container); color: var(--primary); }
.icon-circle.accent { background: var(--accent-container); color: var(--accent); }
.icon-circle.sage { background: color-mix(in srgb, var(--sage) 22%, transparent); color: var(--sage); }
.icon-circle svg.i { width: 28px; height: 28px; }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* --- Split sections (assistant, server, packs) --- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: 16px 0 16px; }
.split > div > p { color: var(--muted); font-size: 1.08rem; margin-bottom: 22px; }
.providers { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.frame { border-radius: 22px; overflow: hidden; border: 1px solid var(--outline); box-shadow: var(--shadow); background: var(--surface); }
.frame .bar { display: flex; gap: 7px; padding: 12px 16px; background: var(--surface-high); border-bottom: 1px solid var(--outline); }
.frame .bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--outline); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; }
.steps li b { display: block; }
.steps li span { color: var(--muted); font-size: 15.5px; }
@media (max-width: 920px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

/* --- FAQ --- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--outline); border-radius: 20px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 18px; }

/* --- Call to action and footer --- */
.cta {
  text-align: center; padding: 64px 28px; border-radius: 40px;
  background: radial-gradient(500px 240px at 50% 0%, var(--glow), transparent 70%), var(--surface); border: 1px solid var(--outline);
}
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 850; }
.cta p { color: var(--muted); margin: 14px auto 28px; max-width: 36em; }
.cta .hero-actions { justify-content: center; margin-top: 0; }
footer { padding: 56px 0 40px; color: var(--muted); font-size: 15px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
footer h4 { color: var(--text); font-size: 15px; margin-bottom: 12px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--primary); }
footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--outline); padding-top: 22px; font-size: 13.5px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr 1fr; } }

/* --- Document pages (privacy) --- */
.doc { max-width: 820px; margin: 0 auto; padding: 56px 0 80px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 850; margin-bottom: 8px; }
.doc h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.doc h3 { font-size: 1.15rem; margin: 28px 0 10px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.doc p { margin: 12px 0; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--text); }
.doc table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { border: 1px solid var(--outline); padding: 8px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-high); }
.gallery .frame img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
