/*
 * Amura design kit (D55): defaults that look good with any stack and any model.
 * Plain CSS on custom properties. A direction (directions/*.css) sets the fonts and the character; the project's
 * tokens (its own tokens.css, written from the person's wishes) come last and win. Never edit this file in a
 * project: override tokens, or add project styles after it.
 */

/* ---------- Tokens (a direction and the project override these) ---------- */
:root {
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);
  --heading-weight: 700;
  --heading-tracking: -0.015em;
  --heading-line: 1.15;

  /* One accent; the neutrals carry a slight tint of it. */
  --accent: #1d5fa6;
  --accent-ink: #ffffff;                                   /* text on the accent */
  --accent-strong: color-mix(in oklab, var(--accent) 82%, #000);
  --accent-soft: color-mix(in oklab, var(--accent) 10%, #fff);
  --tint: 4%;                                              /* how much the accent colours the neutrals */
  --bg: color-mix(in oklab, var(--accent) var(--tint), #fff);
  --surface: #ffffff;
  --surface-2: color-mix(in oklab, var(--accent) calc(var(--tint) * 2), #fff);
  --ink: color-mix(in oklab, var(--accent) 14%, #14161a);
  --muted: color-mix(in oklab, var(--accent) 10%, #5a5f68);
  --line: color-mix(in oklab, var(--accent) 12%, #dfe2e6);

  --success: #1e7a46; --success-soft: #e6f4ec;
  --warning: #9a5b00; --warning-soft: #fdf1dc;
  --danger: #b42318;  --danger-soft: #fdeceb;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 6px 20px rgb(16 24 40 / 6%);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --density: 1;                                            /* 0.75 compact, 1 normal, 1.25 airy */
  --section-pad: calc(var(--space-8) * var(--density));

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.6rem, 1.25rem + 1.5vw, 2.125rem);
  --text-3xl: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --text-4xl: clamp(2.4rem, 1.5rem + 3.8vw, 3.9rem);

  --measure: 68ch;
  --container: 1140px;
  --container-narrow: 760px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--text-base)/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, h4 { margin: 0 0 var(--space-3); font-family: var(--font-heading); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); line-height: var(--heading-line); text-wrap: balance; }
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
p, ul, ol, dl { margin: 0 0 var(--space-4); }
p { max-width: var(--measure); text-wrap: pretty; }
a { color: var(--accent-strong); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 70%, #fff); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
.lead { font-size: var(--text-lg); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--space-4); top: -40px; background: var(--surface); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: var(--space-2); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); margin-inline: auto; }
.section { padding-block: var(--section-pad); }
.section--tint { background: var(--surface-2); }
.section--surface { background: var(--surface); }
.section--accent { background: var(--accent); color: var(--accent-ink); }
.section--accent a:not(.btn) { color: inherit; }
.section__head { max-width: 62ch; margin-bottom: var(--space-6); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center p { margin-inline: auto; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack > * { margin: 0; }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 260px)), 1fr)); }
.split { display: grid; gap: var(--space-7); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-media { grid-template-columns: 1.15fr 0.85fr; }
  .split--reverse > :first-child { order: 2; }
}

/* ---------- Components ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-5); border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 600 var(--text-base)/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn--secondary { background: transparent; color: var(--accent-strong); }
.btn--secondary:hover { background: var(--accent-soft); color: var(--accent-strong); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn--on-accent { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--accent-strong); }
.btn--on-accent:hover { background: color-mix(in oklab, var(--accent-ink) 88%, var(--accent)); color: var(--accent-strong); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--lg { min-height: 52px; padding: 0 var(--space-6); font-size: var(--text-lg); }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); }
.card--raised { border-color: transparent; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-strong); margin-bottom: var(--space-4); }
.badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.alert { padding: var(--space-4); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.alert--success { background: var(--success-soft); border-color: color-mix(in oklab, var(--success) 30%, #fff); }
.alert--warning { background: var(--warning-soft); border-color: color-mix(in oklab, var(--warning) 30%, #fff); }
.alert--danger { background: var(--danger-soft); border-color: color-mix(in oklab, var(--danger) 30%, #fff); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--space-6) 0; }

/* Forms */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.field label { font-weight: 600; }
.field .hint { color: var(--muted); font-size: var(--text-sm); }
.field .error { color: var(--danger); font-size: var(--text-sm); font-weight: 600; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); border: 1px solid color-mix(in oklab, var(--line) 60%, var(--muted)); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.check { display: flex; gap: var(--space-2); align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }

/* Tables that become cards on phones (give each cell data-label="Column") */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: var(--text-sm); color: var(--muted); font-weight: 600; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
@media (max-width: 700px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { border-bottom: 1px solid var(--line); padding: var(--space-3) 0; }
  .table--stack td { border: 0; padding: var(--space-1) var(--space-4); }
  .table--stack td::before { content: attr(data-label); display: block; font-size: var(--text-sm); color: var(--muted); font-weight: 600; }
}

/* ---------- Site patterns ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: var(--text-lg); }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav a { color: var(--ink); text-decoration: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav a.btn { color: var(--accent-ink); padding: 0 var(--space-4); margin-left: var(--space-2); border-radius: var(--radius); }
.nav a.btn:hover { background: var(--accent-strong); color: var(--accent-ink); }
.nav-menu { display: none; }
@media (max-width: 760px) {
  /* A menu that works without JavaScript: <details class="nav-menu"><summary>Menu</summary><nav class="nav">…</nav></details> */
  .site-header .nav:not(.nav-menu .nav) { display: none; }
  .nav-menu { display: block; position: relative; }
  .nav-menu summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; }
  .nav-menu summary::-webkit-details-marker { display: none; }
  .nav-menu .nav { position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; align-items: stretch; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-2); }
}

.hero { padding-block: calc(var(--section-pad) * 1.1); }
.hero h1 { margin-bottom: var(--space-4); }
.hero .lead { margin-bottom: var(--space-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.hero__note { margin-top: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
/* Photo behind the text: <section class="hero hero--cover" style="--hero-image:url(/images/x-1920.webp)"> */
.hero--cover { position: relative; color: #fff; background: linear-gradient(90deg, rgb(0 0 0 / 62%), rgb(0 0 0 / 25%)), var(--hero-image) center / cover no-repeat, var(--accent-strong); min-height: min(78vh, 640px); display: flex; align-items: center; }
.hero--cover .lead, .hero--cover .hero__note { color: rgb(255 255 255 / 88%); }
/* No photo: a typographic hero on a tinted band, with one accent shape */
.hero--plain { background: var(--surface-2); position: relative; overflow: hidden; }
.hero--plain::after { content: ""; position: absolute; right: -8vw; top: -10vw; width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; border-radius: 50%; background: var(--accent-soft); z-index: 0; }
.hero--plain > * { position: relative; z-index: 1; }

.services { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.service h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.service p { color: var(--muted); margin: 0; }

.info-strip { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.info-strip h3 { font-size: var(--text-base); color: var(--muted); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin-bottom: var(--space-1); }
.info-strip p { margin: 0; font-size: var(--text-lg); }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); }
.cta-band h2 { font-size: var(--text-2xl); margin: 0; }

.gallery { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }

.quote { margin: 0; padding: var(--space-5); background: var(--surface); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.quote p { font-size: var(--text-lg); }
.quote cite { color: var(--muted); font-style: normal; font-size: var(--text-sm); }

.site-footer { background: var(--ink); color: color-mix(in oklab, #fff 82%, var(--ink)); padding-block: var(--space-7) var(--space-6); font-size: var(--text-sm); }
.site-footer a { color: #fff; display: inline-block; padding-block: 4px; }
.site-footer h2, .site-footer h3 { color: #fff; font-size: var(--text-base); font-family: var(--font-body); letter-spacing: 0; }
.site-footer__grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer__bottom { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid rgb(255 255 255 / 14%); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; }

/* A floating action (WhatsApp, call) that never covers content: the page keeps room for it. */
.floating-action { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 30; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-5); border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; box-shadow: var(--shadow); }
body:has(.floating-action) { padding-bottom: 88px; }
@media (max-width: 600px) { .floating-action { padding: 0; width: 56px; justify-content: center; } .floating-action span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- App patterns ---------- */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
.app-sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: var(--space-4); }
.app-sidebar .nav { flex-direction: column; align-items: stretch; }
.app-sidebar .nav a[aria-current="page"] { background: var(--accent-soft); box-shadow: none; border-radius: var(--radius-sm); }
.app-main { padding: var(--space-6) var(--gutter); min-width: 0; }
.app-main > * + * { margin-top: var(--space-5); }
@media (min-width: 900px) { .app-shell { grid-template-columns: 248px 1fr; } .app-sidebar { position: sticky; top: 0; height: 100vh; } }
@media (max-width: 899px) { .app-sidebar { border-right: 0; border-bottom: 1px solid var(--line); } .app-sidebar .nav { flex-direction: row; overflow-x: auto; } }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.page-header h1 { font-size: var(--text-2xl); margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.toolbar input[type=search] { flex: 1 1 240px; max-width: 360px; }
.toolbar select { width: auto; min-width: 160px; }
.tiles { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: var(--space-6); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); }
.tile__label { color: var(--muted); font-size: var(--text-sm); }
.tile__value { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: var(--heading-weight); }
.details { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: var(--space-2) var(--space-5); }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
@media (max-width: 600px) { .details { grid-template-columns: 1fr; } .details dd { margin-bottom: var(--space-3); } }
.empty-state { text-align: center; padding: var(--space-8) var(--space-4); border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state h2 { font-size: var(--text-xl); }
.empty-state p { margin-inline: auto; color: var(--muted); }
.app-main h2 { font-size: var(--text-xl); }
.card h2 { font-size: var(--text-xl); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--bg), var(--surface-2)); background-size: 200% 100%; animation: kit-shimmer 1.2s infinite; border-radius: var(--radius-sm); min-height: 1em; }
@keyframes kit-shimmer { to { background-position: -200% 0; } }
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--space-5); background: var(--surface-2); }
.auth .card { width: min(100%, 420px); }
.steps { display: flex; gap: var(--space-2); list-style: none; padding: 0; margin: 0 0 var(--space-6); counter-reset: step; }
.steps li { flex: 1; padding-top: var(--space-2); border-top: 4px solid var(--line); color: var(--muted); font-size: var(--text-sm); }
.steps li[aria-current="step"], .steps li.is-done { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.slots { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.slot { min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font: 600 var(--text-base) var(--font-body); color: var(--ink); cursor: pointer; }
.slot:hover { border-color: var(--accent); }
.slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slot:disabled { color: var(--muted); background: var(--surface-2); text-decoration: line-through; cursor: not-allowed; }
