/* Look and feel follows striveaero.com (charcoal, Manrope, square edges, quiet borders),
   with the Velodynamics blue as the accent colour. */
:root {
  color-scheme: dark;
  --blue: #00adee;      /* exact blue from the Velodynamics logo */
  --blue-hover: #33bef2;
  --bg: #3b3b3b;
  --bg-deep: #333333;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.35);
  --ink: #ffffff;
  --text: rgba(255, 255, 255, 0.75);
  --muted: rgba(255, 255, 255, 0.55);
  --bg-soft: rgba(255, 255, 255, 0.06);
  --danger: #ff7a66;
  --ok: #6fd69a;
  --on-blue: #1f1f1f;
  --footer-bg: #2f2f2f;
  --max: 1200px;
  --pad: 28px;          /* inner padding shared by every panel and card */
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: 0.6px;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.8; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1; width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
button { font: inherit; letter-spacing: inherit; cursor: pointer; }
input, select, textarea { font: inherit; letter-spacing: normal; color: inherit; }
h1, h2, h3 { color: var(--ink); font-weight: 400; line-height: 1.2; letter-spacing: 0.6px; }

/* header: nav left, logo centre, action right */
.site-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 16px max(16px, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.site-header nav a:hover, .site-header nav a.active { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.header-right { justify-self: end; display: flex; align-items: center; gap: 16px; }
.header-right .btn { padding: 8px 20px; font-size: 14px; }
/* ET/EN switch: the current language is plain text, the other one a link */
.lang-switch { display: flex; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.lang-switch a { color: var(--ink); text-decoration: none; }
.lang-switch a:hover { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.lang-switch span[aria-current] { color: var(--blue); }
[id] { scroll-margin-top: 90px; }
.logo { justify-self: center; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo img { display: block; height: 44px; width: auto; }

main { max-width: var(--max); margin: 0 auto; padding: 0 16px 80px; }

.eyebrow { color: var(--blue); font-size: 13px; text-transform: uppercase; letter-spacing: 2.5px; margin: 0 0 12px; }

.section-title { font-size: clamp(28px, 3.4vw, 40px); margin: 72px 0 8px; }
.section-lead { margin: 0 0 28px; color: var(--muted); }
.carousel-head { position: relative; text-align: center; margin: 72px 0 28px; }
.carousel-head .section-title { margin: 0; }

/* buttons: square, solid */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 0; padding: 12px 28px; background: var(--ink); color: #1f1f1f; font-size: 15px; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--on-blue); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #1f1f1f; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* about page */
.story { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding: 72px 0 48px; }
.story h1 { font-size: clamp(34px, 5vw, 52px); text-transform: uppercase; margin: 0; }
.story p { margin: 0 0 16px; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timeline div { padding: var(--pad); display: grid; gap: 6px; text-align: center; }
.timeline div + div { border-left: 1px solid var(--line); }
.timeline b { color: var(--blue); font-weight: 400; font-size: 40px; line-height: 1.1; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.values div { background: var(--panel); border: 1px solid var(--line); padding: var(--pad); text-align: center; }
.values b { color: var(--blue); font-weight: 400; font-size: 32px; }
.values p { margin: 10px 0 0; }
.person { display: grid; grid-template-columns: 300px 1fr; align-items: center; gap: var(--pad); background: var(--panel); border: 1px solid var(--line); padding: var(--pad); margin-bottom: 16px; }
.photo { aspect-ratio: 3 / 4; background: linear-gradient(160deg, rgba(0,173,238,.18), rgba(255,255,255,.03)); position: relative; overflow: hidden; }
.photo::before { content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; color: var(--blue); letter-spacing: 4px; }
.photo img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1); }
.person h3 { font-size: 30px; text-transform: uppercase; margin: 0 0 14px; }
.person-body > p { margin: 0 0 20px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.facts h4 { color: var(--blue); font-weight: 400; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 8px; }
.facts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.facts li { padding-left: 20px; position: relative; line-height: 1.6; }
.facts li::before { content: ''; position: absolute; left: 0; top: 11px; width: 10px; height: 2px; background: var(--blue); }
.contact-line { display: flex; flex-wrap: wrap; gap: 8px 28px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 15px; }
.contact-line span { color: var(--muted); }

/* service page ("Loe lähemalt") */
.service-page { padding: 48px 0 0; }
.service-page .back { display: inline-block; margin-bottom: 28px; text-decoration: none; color: var(--muted); }
.service-page .back:hover { color: var(--blue); }
.service-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.service-page h1 { font-size: clamp(32px, 5vw, 48px); text-transform: uppercase; margin: 0 0 16px; }
.service-page .lead { font-size: 18px; color: var(--ink); margin: 0 0 28px; }
.service-details p { margin: 0 0 18px; }
.service-details h3 { font-size: 20px; margin: 32px 0 12px; color: var(--ink); }
.service-details ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.service-details li { padding-left: 22px; position: relative; line-height: 1.6; }
.service-details li::before { content: ''; position: absolute; left: 0; top: 12px; width: 10px; height: 2px; background: var(--blue); }
.service-aside { position: sticky; top: 100px; border: 1px solid var(--line); background: var(--panel); padding: var(--pad); display: grid; gap: 10px; }
.service-aside .aside-price { color: var(--blue); font-size: 32px; line-height: 1.2; }
.service-aside .btn { margin-top: 8px; }
.service-aside .hint { margin: 4px 0 0; }

/* legal pages (privacy policy, booking terms) */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 0 0; }
.legal h1 { font-size: clamp(28px, 4.5vw, 44px); text-transform: uppercase; margin: 0 0 6px; }
.legal-updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal h3 { font-size: 16px; color: var(--ink); margin: 20px 0 8px; }
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.legal li { padding-left: 22px; position: relative; line-height: 1.6; }
.legal li::before { content: ''; position: absolute; left: 0; top: 12px; width: 10px; height: 2px; background: var(--blue); }
.legal strong { color: var(--ink); font-weight: 500; }
.legal mark.todo { background: rgba(255, 196, 0, .2); color: #ffd25e; padding: 0 4px; }

/* contact page */
.contact { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; padding: 72px 0 0; align-items: stretch; }
.contact h1 { font-size: clamp(34px, 5vw, 52px); text-transform: uppercase; margin: 0 0 32px; }
.contact-block { border-top: 1px solid var(--line); padding: 18px 0; }
.contact-block h4 { color: var(--blue); font-weight: 400; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 6px; }
.contact-block p { margin: 0; color: var(--ink); }
.contact-block > a { display: inline-block; margin-top: 8px; font-size: 14px; }
.muted-text { color: var(--muted); }
.social { display: flex; gap: 10px; margin-top: 6px; }
.social a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--ink); transition: color .15s, border-color .15s; }
.social a:hover { color: var(--blue); border-color: var(--blue); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.social svg[fill="none"] { fill: none; }
.map { border: 1px solid var(--line); min-height: 480px; background: var(--panel); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 480px; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

/* in-page confirm / alert / prompt (dialog.js) */
dialog.ui-dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line-strong); border-radius: 0; padding: 24px; background: var(--bg-deep); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
dialog.ui-dialog::backdrop { background: rgba(10, 10, 10, .6); }
.ui-dialog-msg { margin: 0 0 18px; color: var(--ink); white-space: pre-line; line-height: 1.6; }
.ui-dialog-input { width: 100%; margin-bottom: 18px; border: 1px solid var(--line-strong); background: rgba(0,0,0,.15); color: var(--ink); padding: 10px 12px; }
.ui-dialog-input:focus { outline: 1px solid var(--blue); border-color: var(--blue); }
.ui-dialog-icon { width: 48px; height: 48px; border: 1px solid var(--blue); color: var(--blue); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.ui-dialog-title { margin: 0 0 12px; font-size: 22px; text-transform: uppercase; }
.ui-dialog-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; }
.ui-dialog-details dt { color: var(--muted); }
.ui-dialog-details dd { margin: 0; color: var(--ink); }
.ui-dialog-check { display: flex; gap: 10px; align-items: center; margin: -4px 0 18px; color: var(--ink); font-size: 15px; cursor: pointer; }
.ui-dialog-check input { width: 16px; height: 16px; accent-color: var(--blue); }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.close { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); padding: 0 4px; }
.close:hover { color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; color: var(--ink); }
.field input, .field select, .field textarea { border: 1px solid var(--line-strong); border-radius: 0; padding: 10px 12px; background: rgba(0, 0, 0, 0.15); color: var(--ink); }
.field select option { background: var(--bg-deep); }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 1px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.phone { display: flex; gap: 6px; }
.phone select { flex: 0 0 108px; min-width: 0; }
.phone input { flex: 1; min-width: 0; }
/* minmax(0, …) and min-width: 0 let the columns shrink below the inputs' built-in minimum width */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.row > * { min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; color: var(--text); }
.check input { margin-top: 5px; accent-color: var(--blue); }
/* Spam trap: a field people never see, so only bots fill it in */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; margin-top: 8px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }

.loading { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* Menu button: only on narrow screens, where the nav becomes a dropdown under the header's right side */
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr auto; }
  .logo { justify-self: start; grid-row: 1; grid-column: 1; }
  .header-right { grid-row: 1; grid-column: 2; gap: 18px; }
  .menu-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: transparent; color: var(--ink); }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
  .menu-toggle span::before, .menu-toggle span::after { content: ''; position: absolute; left: 0; }
  .menu-toggle span::before { top: -6px; }
  .menu-toggle span::after { top: 6px; }
  .site-header.menu-open .menu-toggle span { background: transparent; }
  .site-header.menu-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
  .site-header.menu-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
  .site-header nav { display: none; position: absolute; top: 100%; right: max(16px, calc((100vw - var(--max)) / 2)); min-width: 200px;
    flex-direction: column; gap: 0; background: #444; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
  .site-header.menu-open nav { display: flex; }
  .site-header nav a { padding: 14px 20px; font-size: 16px; }
  .site-header nav a + a { border-top: 1px solid var(--line); }
  .site-header nav a.active { color: var(--blue); text-decoration: none; }
}
@media (max-width: 800px) {
  .story, .values, .person, .facts, .contact, .service-layout { grid-template-columns: 1fr; }
  .service-aside { position: static; }
  .contact { gap: 24px; }
  .map, .map iframe { min-height: 340px; }
  .story { gap: 16px; }
  .photo { width: 100%; max-width: 300px; justify-self: center; }
  .timeline b { font-size: 30px; }
  .timeline div { padding: 20px 8px; }
  /* Half the desktop spacing between sections */
  .section-title { margin-top: 36px; }
  .carousel-head { margin: 36px 0 14px; }
  main { padding-bottom: 40px; }
  .story { padding: 20px 0 24px; }
  .contact { padding-top: 20px; }
  .service-page { padding-top: 24px; }
  .legal { padding-top: 28px; }
  .legal h2 { margin-top: 20px; }
}
@media (max-width: 640px) {
  :root { --pad: 20px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .header-right .btn { padding: 8px 14px; }
  .logo img { height: 34px; }
}
