/* ===================================================
   Cantiere Nautico Dell'Oro — Parè di Valmadrera, dal 1963
   Lago profondo + giallo da carroponte. Archivo, una famiglia.
   =================================================== */

:root {
  --lake-950: oklch(0.20 0.035 238);
  --lake-900: oklch(0.25 0.045 238);
  --lake-800: oklch(0.31 0.055 238);
  --lake-600: oklch(0.45 0.07 238);
  --lake-100: oklch(0.945 0.012 238);
  --lake-050: oklch(0.975 0.006 238);
  --bg:       oklch(0.99 0.003 238);
  --ink:      oklch(0.19 0.025 238);
  --ink-2:    oklch(0.33 0.022 238);
  --ink-3:    oklch(0.46 0.02 238);
  --rule:     oklch(0.87 0.01 238);
  --rule-dark: oklch(0.36 0.04 238);
  --on-dark:  oklch(0.96 0.008 238);
  --on-dark-2: oklch(0.80 0.02 238);
  --signal:   oklch(0.83 0.16 88);
  --signal-hover: oklch(0.88 0.15 92);
  --danger:   oklch(0.52 0.18 28);
  --ok:       oklch(0.50 0.12 155);

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wide: 112%;
  --radius: 4px;
  --max: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --z-sticky: 100;
  --z-menu: 110;
  --z-callbar: 120;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, iframe { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--signal); color: var(--lake-950); padding: .6rem 1rem; font-weight: 700; }
.skip:focus { top: 1rem; }

h1, h2, h3 {
  color: var(--ink);
  font-stretch: var(--wide);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h3, .h3-like { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); line-height: 1.2; }
p { max-width: 68ch; text-wrap: pretty; }
strong { color: var(--ink); font-weight: 650; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section--tint { background: var(--lake-050); border-block: 1px solid var(--rule); }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.5; color: var(--ink-2); }
.muted { color: var(--ink-3); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.3rem;
  border: 2px solid transparent; border-radius: var(--radius);
  font-weight: 700; font-stretch: var(--wide); font-size: 1rem; letter-spacing: .005em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--call { background: var(--signal); color: var(--lake-950); }
.btn--call:hover { background: var(--signal-hover); }
.btn--line { border-color: currentColor; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--line-light { border-color: var(--on-dark); color: var(--on-dark); }
.btn--line-light:hover { background: var(--on-dark); color: var(--lake-950); }
.btn--dark { background: var(--lake-900); color: var(--on-dark); }
.btn--dark:hover { background: var(--lake-800); }
.link-arrow { font-weight: 650; color: var(--lake-600); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.link-arrow:hover { color: var(--ink); text-decoration-thickness: 2px; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--lake-950); color: var(--on-dark);
  border-bottom: 1px solid var(--rule-dark);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; margin-right: auto; }
.brand-name { font-weight: 800; font-stretch: var(--wide); font-size: 1.15rem; letter-spacing: -.01em; color: var(--on-dark); }
.brand-name span { color: var(--signal); }
.brand-sub { font-size: .8rem; color: var(--on-dark-2); letter-spacing: .01em; }
.nav { display: flex; gap: .25rem; }
.nav a {
  padding: .55rem .8rem; text-decoration: none; font-weight: 550; color: var(--on-dark-2);
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--on-dark); }
.nav a[aria-current="page"] { color: var(--on-dark); border-bottom-color: var(--signal); }
.header-call { min-height: 42px; padding: .5rem 1rem; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--rule-dark); border-radius: var(--radius);
  background: none; color: var(--on-dark); cursor: pointer; align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* --- Hero --- */
.hero { position: relative; isolation: isolate; color: var(--on-dark); background: var(--lake-950); }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, oklch(0.18 0.035 238 / .82) 0%, oklch(0.18 0.035 238 / .55) 42%, oklch(0.18 0.035 238 / .05) 75%),
    linear-gradient(0deg, oklch(0.18 0.035 238 / .55) 0%, transparent 40%);
}
.hero-inner { min-height: min(84svh, 760px); display: flex; flex-direction: column; justify-content: flex-end; padding-block: clamp(5rem, 12vh, 8rem) clamp(2.5rem, 6vh, 4rem); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero-lead { margin-top: 1.25rem; max-width: 46ch; font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); line-height: 1.5; color: var(--on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-credit { position: absolute; right: var(--gutter); bottom: .6rem; font-size: .7rem; color: oklch(0.85 0.01 238 / .75); }
.hero-credit a { color: inherit; }

/* Hero entrance: visible by default, motion only adds polish */
@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: settle 1.6s var(--ease) both; }
  .hero-inner > * { animation: rise .9s var(--ease) both; }
  .hero-inner > :nth-child(2) { animation-delay: .08s; }
  .hero-inner > :nth-child(3) { animation-delay: .16s; }
  @keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* --- Facts strip --- */
.facts { background: var(--bg); border-bottom: 1px solid var(--rule); }
.facts-list { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-list li { padding: 1.25rem 1.25rem 1.3rem; border-left: 1px solid var(--rule); }
.facts-list li:first-child { border-left: 0; padding-left: 0; }
.facts-list b { display: block; color: var(--ink); font-weight: 700; font-stretch: var(--wide); font-size: 1.02rem; }
.facts-list span { font-size: .93rem; color: var(--ink-3); }

/* --- Section heading --- */
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.head p { color: var(--ink-2); }

/* --- Two doors (privati / lavori) --- */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); }
.door { display: grid; grid-template-rows: auto 1fr; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.door-img { aspect-ratio: 16 / 9; overflow: hidden; }
.door-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.door:hover .door-img img { transform: scale(1.03); }
.door-body { padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1rem; }
.door-for { font-weight: 650; color: var(--lake-600); }
.door ul { border-top: 1px solid var(--rule); }
.door li { border-bottom: 1px solid var(--rule); }
.door li a { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; text-decoration: none; color: var(--ink); font-weight: 600; }
.door li a::after { content: "→"; color: var(--lake-600); transition: transform .2s var(--ease); }
.door li a:hover::after { transform: translateX(4px); }
.door li a small { display: block; font-weight: 400; color: var(--ink-3); font-size: .9rem; }

/* --- Service register --- */
.register { border-top: 2px solid var(--ink); }
.reg-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .9fr);
  gap: clamp(1.25rem, 3vw, 3rem); padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid var(--rule); align-items: start;
}
.reg-title h3 { margin-bottom: .5rem; }
.reg-title .reg-for { font-size: .9rem; color: var(--ink-3); }
.reg-text p + p { margin-top: .75rem; }
.reg-text ul { margin-top: 1rem; display: grid; gap: .35rem; }
.reg-text li { padding-left: 1.1rem; position: relative; }
.reg-text li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5rem; height: 2px; background: var(--lake-600); }
.reg-img { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--lake-100); }
.reg-img img { width: 100%; height: 100%; object-fit: cover; }

/* --- Dark band: history + RINA --- */
.band { background: var(--lake-950); color: var(--on-dark-2); }
.band h2, .band h3, .band strong { color: var(--on-dark); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.band p { line-height: 1.7; }
.band p + p { margin-top: 1rem; }
.band-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; max-height: 620px; }
.band-img img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
.cert { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; padding: 1rem; background: #fff; border-radius: var(--radius); max-width: 30rem; }
.cert img { width: 150px; height: auto; flex: none; }
.cert span { color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.cert strong { color: var(--ink); }

/* --- Partner (Lario Water Taxi) --- */
.partner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.partner-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.partner-img img { width: 100%; height: 100%; object-fit: cover; }
.partner .btn { margin-top: 1.5rem; }

/* --- Conditions (weather) --- */
.conditions { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; padding: 1.25rem clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); }
.conditions-title { font-weight: 700; font-stretch: var(--wide); color: var(--ink); }
.conditions-title small { display: block; font-weight: 400; font-stretch: 100%; color: var(--ink-3); font-size: .85rem; }
.conditions-data { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.conditions-data div { display: flex; flex-direction: column; }
.conditions-data b { color: var(--ink); font-size: 1.25rem; font-stretch: var(--wide); font-variant-numeric: tabular-nums; }
.conditions-data span { font-size: .82rem; color: var(--ink-3); }

/* --- Contact band --- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-phone { display: inline-block; margin-top: 1.25rem; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); font-weight: 800; font-stretch: var(--wide); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.contact-phone:hover { color: var(--lake-600); }
.dl { margin-top: 1.75rem; border-top: 1px solid var(--rule); }
.dl div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.dl dt { color: var(--ink-3); font-size: .92rem; }
.dl dd { color: var(--ink); }
.dl a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); aspect-ratio: 4 / 3; background: var(--lake-100); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* --- Page header (inner pages) --- */
.page-head { background: var(--lake-950); color: var(--on-dark-2); padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.page-head h1 { color: #fff; max-width: 18ch; }
.page-head p { margin-top: 1rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--on-dark-2); }
.page-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.page-nav a { padding: .45rem .85rem; border: 1px solid var(--rule-dark); border-radius: 999px; text-decoration: none; color: var(--on-dark); font-size: .93rem; }
.page-nav a:hover { border-color: var(--signal); }

/* --- Directions / split --- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.steps { margin-top: 1.5rem; border-top: 1px solid var(--rule); }
.steps li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.steps b { color: var(--ink); }
.figure { border-radius: var(--radius); overflow: hidden; }
.figure img { width: 100%; height: auto; }
.figure figcaption { padding-top: .5rem; font-size: .8rem; color: var(--ink-3); }

/* --- Form --- */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field label i { font-style: normal; color: var(--ink-3); font-weight: 400; }
.input {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  border: 1px solid oklch(0.70 0.015 238); border-radius: var(--radius); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: oklch(0.52 0.015 238); }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--lake-600); box-shadow: 0 0 0 3px oklch(0.45 0.07 238 / .2); }
textarea.input { min-height: 9rem; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23334' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
.form-note { font-size: .88rem; color: var(--ink-3); }
.notice { padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid; font-weight: 550; }
.notice--ok { border-color: var(--ok); color: oklch(0.36 0.1 155); background: oklch(0.96 0.03 155); }
.notice--err { border-color: var(--danger); color: oklch(0.42 0.16 28); background: oklch(0.96 0.03 28); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Footer --- */
.site-footer { background: var(--lake-950); color: var(--on-dark-2); padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.site-footer h2 { font-size: .95rem; color: var(--on-dark); margin-bottom: .85rem; letter-spacing: 0; }
.site-footer li + li { margin-top: .45rem; }
.site-footer a { text-decoration: none; color: var(--on-dark-2); }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-brand p { margin-top: .85rem; max-width: 34ch; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; font-size: .8rem; color: oklch(0.72 0.02 238); }
.footer-bottom a { color: inherit; text-decoration: underline; }

/* --- Mobile call bar --- */
.callbar { display: none; }

/* --- Responsive --- */
@media (max-width: 1000px) {
  .reg-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .reg-img { grid-column: 2; grid-row: 1 / span 2; }
  .reg-title { grid-column: 1; }
  .reg-text { grid-column: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav, .header-call { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav.is-open {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--lake-950); padding: .5rem var(--gutter) 1.25rem; border-bottom: 1px solid var(--rule-dark); z-index: var(--z-menu);
  }
  .nav.is-open a { padding: .9rem 0; border-bottom: 1px solid var(--rule-dark); font-size: 1.1rem; }
  .head, .doors, .band-grid, .partner, .contact, .split { grid-template-columns: 1fr; }
  .head { align-items: start; }
  .facts-list { grid-template-columns: 1fr 1fr; }
  .facts-list li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .facts-list li:nth-child(-n+2) { border-top: 0; }
  .facts-list li:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--rule); }
  .band-img { aspect-ratio: 4 / 3; }
  .conditions { grid-template-columns: 1fr; }
  .callbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-callbar);
    gap: .5rem; padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
    background: var(--lake-950); border-top: 1px solid var(--rule-dark);
  }
  .callbar .btn { flex: 1; justify-content: center; }
  body { padding-bottom: 4.5rem; }
}
@media (max-width: 620px) {
  .reg-row { grid-template-columns: 1fr; }
  .reg-img { grid-column: auto; grid-row: auto; order: -1; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .dl div, .steps li { grid-template-columns: 1fr; gap: .15rem; }
  .hero-media img { object-position: 38% 60%; }
  .hero-media::after { background: linear-gradient(0deg, oklch(0.18 0.035 238 / .9) 0%, oklch(0.18 0.035 238 / .55) 55%, oklch(0.18 0.035 238 / .25) 100%); }
  .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
