/*
  Site styles. Same approach as the MyDesktopWidget blog (design tokens, fluid type, hairline edges,
  automatic dark mode), with its own palette: a deep teal that reads as local and trustworthy.
  Light is the default look; dark follows the visitor's system setting.
*/

:root {
  color-scheme: light dark;

  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-soft: #ccfbf1;
  --on-brand: #ffffff;
  --whatsapp: #128c7e;

  --surface: #ffffff;
  --surface-alt: #f4f8f7;
  --on-surface: #15201f;
  --muted: #4b5a58;

  --edge: color-mix(in srgb, var(--on-surface) 12%, transparent);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 4px 16px rgb(0 0 0 / 0.06);

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

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3rem);

  --gap-1: 0.5rem;
  --gap-2: 0.875rem;
  --gap-3: 1.5rem;
  --gap-4: 2.5rem;
  --gap-5: 4.5rem;

  --radius: 12px;
  --radius-lg: 18px;
  --wide: 70rem;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-soft: #134e4a;
    --on-brand: #042f2e;
    --surface: #111716;
    --surface-alt: #18201f;
    --on-surface: #e6efed;
    --muted: #a6b8b5;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--surface);

  /* Sticky footer: the page is at least one screen tall and <main> takes up the slack, so on a
     short page (privacy, 404) the footer sits on the bottom edge instead of floating mid-screen.
     dvh, not vh: on phones vh includes the space behind the browser's address bar. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > .site-header, body > .site-footer { flex-shrink: 0; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--gap-2); letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); }
h2, .h2 { font-size: var(--step-2); }
h3, .h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--gap-2); }
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; height: auto; display: block; }

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

.container { width: min(100% - 2rem, var(--wide)); margin-inline: auto; }
.narrow { max-width: var(--measure); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 40rem; }

.skip-link { position: absolute; left: -999px; top: 0; padding: var(--gap-1) var(--gap-2); background: var(--brand); color: var(--on-brand); z-index: 100; }
.skip-link:focus { left: var(--gap-1); top: var(--gap-1); }
main:focus { outline: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 44px; /* comfortable thumb target */
  padding: 0.65em 1.3em;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-light { background: #fff; color: #0f766e; }
.btn-light:hover { background: #f0fdfa; color: #115e59; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #0e7266; color: #fff; }
.btn-small { min-height: 38px; padding: 0.4em 1em; font-size: var(--step--1); }

.badge { display: inline-block; padding: 0.15em 0.65em; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 0.75rem; font-weight: 600; vertical-align: middle; }
.badge-soft { background: var(--brand-soft); color: var(--brand-strong); }

/* ---------- Header (the blog's slim bar, plus a call to action) ---------- */

.site-header { border-bottom: 1px solid var(--edge); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.site-header-inner {
  width: min(100% - 2rem, var(--wide)); margin-inline: auto;
  display: flex; align-items: center; gap: var(--gap-3); min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--on-surface); text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.site-nav { list-style: none; display: flex; gap: var(--gap-3); margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--on-surface); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 6px; }

@media (max-width: 640px) {
  .site-header-inner { flex-wrap: wrap; gap: var(--gap-1) var(--gap-2); padding-block: var(--gap-1); }
  .site-header nav { order: 3; width: 100%; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--gap-5); }
.section-tint { background: var(--surface-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--gap-2); }
.page-head { padding-block: var(--gap-5) var(--gap-3); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--step--1); font-weight: 700; color: var(--brand); }
.actions { display: flex; flex-wrap: wrap; gap: var(--gap-2); margin-top: var(--gap-3); }

.hero { padding-block: var(--gap-5); background: linear-gradient(180deg, var(--surface-alt), var(--surface)); }
.hero-grid { display: grid; gap: var(--gap-4); align-items: center; }
.hero-photo img, .photo-placeholder { border-radius: var(--radius-lg); aspect-ratio: 6 / 7; object-fit: cover; width: 100%; max-width: 26rem; margin-inline: auto; }
.photo-placeholder { display: grid; place-content: center; text-align: center; padding: var(--gap-3); border: 2px dashed var(--edge); color: var(--muted); background: var(--surface); }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.3fr 1fr; } }

.steps { list-style: none; padding: 0; margin: var(--gap-3) 0 0; display: grid; gap: var(--gap-3); counter-reset: step; }
.step { position: relative; padding: var(--gap-3); padding-top: calc(var(--gap-3) + 2.4rem); border: 1px solid var(--edge); border-radius: var(--radius); counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: var(--gap-3); left: var(--gap-3); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; }
.step p { color: var(--muted); margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Cards (the blog's archive: first card full width, then two-up) ---------- */

.cards { display: grid; gap: var(--gap-3); margin-top: var(--gap-3); }
.card { border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-link:hover h3 { color: var(--brand); }
.card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-image-placeholder { display: grid; place-items: center; font-size: 4rem; font-weight: 800; color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), var(--surface-alt)); }
.card-body { padding: var(--gap-3); }
.card-body p:last-child { color: var(--muted); margin: 0; }
.card-meta { font-size: var(--step--1); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5em; align-items: center; margin-bottom: var(--gap-1); }
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card:first-child { grid-column: 1 / -1; }
  .card:first-child .card-link { display: grid; grid-template-columns: 1.4fr 1fr; }
  .card:first-child .card-image { height: 100%; aspect-ratio: auto; min-height: 16rem; }
  .card:first-child .card-body { align-self: center; }
  .card:first-child h3 { font-size: var(--step-2); }
}

/* ---------- Services ---------- */

.services { display: grid; gap: var(--gap-3); margin-top: var(--gap-3); }
.service { display: flex; flex-direction: column; padding: var(--gap-3); border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
.service .ticks { flex: 1; } /* buttons line up along the bottom */
.service-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--brand-soft); margin-bottom: var(--gap-2); }
.service-icon svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--brand-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-cta { margin-top: var(--gap-3); align-self: flex-start; }
@media (min-width: 860px) { .services { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Contact: interest choice ---------- */

.choice-group { border: 0; padding: 0; margin: 0; }
.choice-group legend { font-weight: 600; margin-bottom: 0.5rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 0.5em 1em; border: 1px solid color-mix(in srgb, var(--on-surface) 25%, transparent); border-radius: 999px; cursor: pointer; }
.choice input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- Packages ---------- */

.packages { display: grid; gap: var(--gap-3); margin-top: var(--gap-3); }
.package { position: relative; padding: var(--gap-3); border: 1px solid var(--edge); border-radius: var(--radius); }
.package.is-highlight { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.package .badge { position: absolute; top: -0.8rem; left: var(--gap-3); }
.price { font-size: var(--step-2); font-weight: 800; color: var(--brand-strong); margin-bottom: var(--gap-1); }
.ticks { list-style: none; padding: 0; margin: var(--gap-2) 0 0; }
.ticks li { padding-left: 1.6em; position: relative; margin-bottom: 0.35em; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
@media (min-width: 860px) { .packages { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Callout, FAQ, about, CTA ---------- */

.callout { padding: var(--gap-4); border-radius: var(--radius-lg); background: var(--brand-soft); }
.callout h2 { color: var(--brand-strong); }
.callout .prose p:last-child { margin: 0; }

.faq { border-bottom: 1px solid var(--edge); padding-block: var(--gap-2); }
.faq summary { cursor: pointer; font-weight: 600; font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: var(--gap-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 800; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: var(--gap-1) 0 0; color: var(--muted); }

.about { display: grid; gap: var(--gap-4); align-items: center; }
.about-photo { border-radius: 50%; width: 12rem; height: 12rem; object-fit: cover; }
@media (min-width: 760px) { .about { grid-template-columns: auto 1fr; } }

.cta-band { background: var(--brand); color: var(--on-brand); }
.cta-band h2 { color: inherit; }
@media (prefers-color-scheme: dark) { .cta-band { background: var(--brand-soft); color: var(--on-surface); } }

.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--gap-4); }
.prose h3 { margin-top: var(--gap-3); font-size: var(--step-0); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.35em; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--gap-2) 0 var(--gap-3); font-size: var(--step--1); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--edge); }
.prose th { color: var(--muted); font-weight: 600; }
.prose code { font-size: 0.9em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--surface-alt); }
/* Details only the owner can fill in (e.g. in the privacy notice): impossible to miss until edited. */
.prose mark { background: #fde68a; color: #422006; padding: 0 0.2em; border-radius: 3px; }
.prose img { border-radius: var(--radius); }
.project-shot { border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-inline: auto; }

/* ---------- Contact form ---------- */

.contact-grid { display: grid; gap: var(--gap-4); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 2fr 1fr; } }
.contact-aside { padding: var(--gap-3); border-radius: var(--radius); background: var(--surface-alt); align-self: start; }

.form { display: grid; gap: var(--gap-3); max-width: 40rem; }
.field { display: grid; gap: 0.35rem; }
.field-row { display: grid; gap: var(--gap-3); }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: inherit; background: var(--surface);
  padding: 0.65rem 0.8rem; border: 1px solid color-mix(in srgb, var(--on-surface) 25%, transparent); border-radius: 8px;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.field-error { color: #b42318; font-size: var(--step--1); }
.field-error:empty { display: none; }
.input-validation-error { border-color: #b42318 !important; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--brand); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: var(--gap-2) var(--gap-3); border-radius: var(--radius); }
.notice-success { background: var(--brand-soft); color: var(--brand-strong); }
.notice-error { background: #fef3f2; color: #b42318; }
.notice-error.validation-summary-valid { display: none; }
.notice ul { margin: 0; padding-left: 1.2em; }

/* ---------- Footer & phone action bar ---------- */

.site-footer { border-top: 1px solid var(--edge); padding-block: var(--gap-4) var(--gap-3); background: var(--surface-alt); }
.footer-grid { display: grid; gap: var(--gap-3); }
.footer-brand { font-weight: 700; }
.footer-contact { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-legal { margin-top: var(--gap-3); padding-top: var(--gap-2); border-top: 1px solid var(--edge); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr; } }

.mobile-actions { display: none; }
@media (max-width: 760px) {
  .mobile-actions {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--gap-1);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: var(--gap-1) var(--gap-2) calc(var(--gap-1) + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--edge);
  }
  .mobile-actions .btn-outline { background: var(--surface); }
  body:has(.mobile-actions) { padding-bottom: 4.5rem; }
  .header-cta { display: none; } /* the bottom bar and the hero buttons cover it on phones */
}

/* ---------- Blocks (from the CMS editor) ---------- */

.block { margin-bottom: var(--gap-3); }
.block-columns { display: grid; gap: var(--gap-3); }
@media (min-width: 760px) { .block-columns { grid-auto-flow: column; grid-auto-columns: 1fr; } }
.block-gallery { display: grid; gap: var(--gap-2); grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.block-gallery img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
blockquote { margin: 0; padding-left: var(--gap-3); border-left: 4px solid var(--brand); font-size: var(--step-1); }
blockquote cite { display: block; font-size: var(--step-0); color: var(--muted); margin-top: var(--gap-1); }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: var(--step--1); margin-top: var(--gap-1); }
