/* =====================================================================
   Palette: Greek road-sign blue, number-plate yellow, limestone, asphalt.
   ===================================================================== */
:root {
  --ink: #22262b;
  --muted: #5d6661;
  --bg: #eceee9;
  --paper: #ffffff;
  --line: #d2d7d0;
  --sign: #1f4fa3;
  --sign-deep: #163c7e;
  --plate: #f2c230;
  --plate-soft: #fbeec2;
  --free: #3f6b2a;
  --busy: #b5432f;
  --radius: 14px;
  --font: "Commissioner", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 1rem; line-height: 1.55;
  font-feature-settings: "tnum" 0;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--sign); }
:focus-visible { outline: 3px solid var(--plate); outline-offset: 2px; }
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.demo-banner { background: var(--plate); color: var(--ink); text-align: center; font-size: .875rem; padding: .45rem 1rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-block: 1.1rem; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; }
.brand::before { content: ""; width: 1.05rem; height: 1.05rem; border-radius: 4px; background: var(--sign); box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 3.5px #fff; }
.lang { display: flex; gap: .25rem; }
.lang button { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: .3rem .6rem; font-size: .875rem; font-weight: 600; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.lang select {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 8px;
  padding: .35rem .5rem; font-size: .875rem; font-weight: 600; cursor: pointer; max-width: 11rem;
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(2rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 {
  font-size: clamp(2.15rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 800;
  margin: 0 0 1.1rem; white-space: pre-line;
  /* long Nordic words ("förskottsbetalning") must never push the page sideways on a phone */
  hyphens: auto; overflow-wrap: break-word;
}
/* Panoramic photo of the Fortezza of Rethymno behind the top bar and the hero
   (photo: Stefan Szankowski, Unsplash License). The fortress sits on the right;
   a dark wash on the left keeps the white title readable. */
.hero-bg {
  background:
    linear-gradient(90deg, rgba(8, 28, 64, .55), rgba(8, 28, 64, .15) 55%, rgba(8, 28, 64, 0) 80%),
    url("hero-fortezza.jpg") 70% 45% / cover no-repeat,
    #2f6aa8;
  color: #fff; margin-bottom: 2.5rem;
}
.hero-bg .brand { color: #fff; }
.hero-bg .brand::before { box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 3.5px #fff, 0 0 0 1.5px #fff; }
.hero-bg .lang button { border-color: rgba(255,255,255,.55); color: #fff; }
.hero-bg .lang button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.hero-bg .lang select { background: rgba(255,255,255,.94); border-color: #fff; }
.hero-bg .hero h1 { color: #fff; text-shadow: 0 1px 14px rgba(8, 28, 64, .35); }
.hero-chips { list-style: none; padding: 0; margin: 1.4rem 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-chips li {
  background: rgba(255,255,255,.94); color: var(--ink); border-radius: 999px; padding: .35rem .85rem .35rem .7rem;
  font-size: .9375rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem;
}
.hero-chips li::before { content: "✓"; color: var(--free); font-weight: 800; }
.hero-bg .sign { box-shadow: 0 10px 30px rgba(8, 28, 64, .25); }


/* The road sign: the one loud element on the page */
.sign {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1rem 1rem;
  background: #016064; color: #fff; border-radius: 16px; padding: 1.35rem 1.4rem 1.4rem;
  outline: 3px solid #fff; outline-offset: -8px; max-width: 640px;
}
.sign :focus-visible { outline-color: var(--plate); }
.sign .sign-days { grid-column: 1 / -1; justify-self: start; margin: 0; }
.sign .sign-go { grid-column: 1 / -1; border-radius: 6px; }
.sign-field { display: grid; gap: .3rem; font-size: .875rem; font-weight: 500; opacity: .95; }
.sign-field input {
  background: transparent; border: 0; border-bottom: 2px solid rgba(255,255,255,.55); color: #fff;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; padding: .2rem 0 .35rem; min-width: 0; width: 100%;
  color-scheme: dark;
}
.sign-field input:focus { outline: none; border-bottom-color: var(--plate); }
/* Instead of the browser's "dd/mm/yyyy": our own words ("Pick-up date") until a date is chosen.
   The empty (required → :invalid) date is hidden; the words sit on top and let clicks through. */
/* min-width: 0 lets the two date columns shrink to the sign's width (otherwise the button spills out) */
.sign-field, .sign-input { min-width: 0; }
.sign-input { position: relative; display: block; }
.sign-field input:invalid:not(:focus) { color: transparent; }
.sign-input .ph {
  position: absolute; left: 0; right: 2rem; bottom: .55rem; pointer-events: none;
  font-size: clamp(.9rem, 1.5vw, 1.05rem); font-weight: 600; color: rgba(255,255,255,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sign-input input:valid + .ph, .sign-input input:focus + .ph { display: none; }.sign-arrow { font-size: 2rem; font-weight: 800; line-height: 1; padding-bottom: .55rem; }
.sign-days {
  background: var(--plate); color: var(--ink); font-weight: 800; border-radius: 8px; padding: .45rem .75rem;
  white-space: nowrap; margin-bottom: .3rem; font-size: 1rem;
}
.sign-days:empty { display: none; }
.sign-go {
  background: #fff; color: var(--ink); border: 1.5px solid #fff; border-radius: 10px; padding: .85rem 1.25rem;
  font-weight: 700; cursor: pointer; white-space: nowrap;
}
.sign-go:hover { background: var(--plate); border-color: var(--plate); color: var(--ink); }
@media (max-width: 760px) {
  .sign { grid-template-columns: 1fr 1fr; padding: 1.25rem 1.2rem 1.2rem; }
  .sign-arrow { display: none; }
  .sign-days { grid-column: 1 / -1; justify-self: start; margin: 0; }
  .sign-go { grid-column: 1 / -1; }
}

/* ---------- cars ---------- */
/* ---------- our pick for you ---------- */
.picks { padding-block: 0 2.5rem; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.pick {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.pick-img { aspect-ratio: 16 / 10; background: #e4e8e3; object-fit: cover; width: 100%; }
.pick-body { padding: .8rem .9rem .9rem; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; flex: 1; }
.pick h3 { margin: 0; font-size: 1.1rem; letter-spacing: -.01em; }
.pick .car-cat { white-space: normal; }
.pick .btn { margin-top: auto; align-self: stretch; padding-block: .55rem; }
.pick .avail { margin-bottom: .4rem; }
@media (max-width: 520px) {
  .pick-list { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .pick-body { padding: .65rem .7rem .75rem; }
  .pick h3 { font-size: 1rem; }
  .pick .car-cat { font-size: .8125rem; }
}

.cars { padding-block: 1rem 4rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem; margin-bottom: 1.4rem; }
.section-head h2, .steps h2 { font-size: 1.9rem; letter-spacing: -.015em; margin: 0; font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.4rem 0 1.4rem; }
.cat-tabs button {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: .45rem .9rem; font-size: .9375rem; font-weight: 600;
}
.cat-tabs button:hover { border-color: var(--sign); color: var(--sign); }
.cat-tabs button[aria-pressed="true"] { background: var(--sign); border-color: var(--sign); color: #fff; }
.cat-tabs .n { font-size: .75rem; font-weight: 700; color: var(--muted); }
.cat-tabs button[aria-pressed="true"] .n { color: rgba(255,255,255,.8); }
.car-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; }
.car {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.car-img { aspect-ratio: 16 / 9; background: #e4e8e3; object-fit: cover; width: 100%; }
.car-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.car-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem .8rem; }
.car h3 { margin: 0; font-size: 1.3rem; letter-spacing: -.01em; }
.car-cat { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.specs li { font-size: .8125rem; background: var(--bg); border-radius: 6px; padding: .15rem .5rem; }
.car-desc { margin: 0; color: var(--muted); font-size: .9375rem; }
/* Similar free cars, shown when the chosen car is booked for the searched dates */
.alts { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .875rem; }
.alts > span { color: var(--muted); font-weight: 600; margin-right: .1rem; }
.alts .alt {
  border: 1.5px solid var(--sign); background: var(--paper); color: var(--sign); border-radius: 999px;
  padding: .2rem .7rem; font-size: .8125rem; font-weight: 700; cursor: pointer;
}
.alts .alt:hover { background: var(--sign); color: #fff; }
.alts-box { background: var(--plate-soft); border-radius: 10px; padding: .75rem .9rem; margin-bottom: .9rem; }
.alts-box p { margin: 0 0 .5rem; font-size: .9375rem; }
.car-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .5rem; }
.price { font-size: .9375rem; color: var(--muted); }
.price strong { color: var(--ink); font-size: 1.2rem; }
.avail { font-size: .875rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.avail::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.avail.free { color: var(--free); }
.avail.busy { color: var(--busy); }
.car.is-busy .car-img { filter: grayscale(.85); opacity: .7; }
.btn {
  border: 0; border-radius: 10px; padding: .7rem 1.1rem; font-weight: 700; cursor: pointer; background: var(--sign); color: #fff;
}
.btn:hover { background: var(--sign-deep); }
.btn.ghost { background: transparent; color: var(--sign); box-shadow: inset 0 0 0 1.5px var(--sign); }
.btn.ghost:hover { background: rgba(31,79,163,.07); }
.btn:disabled { opacity: .55; cursor: progress; }
.empty { color: var(--muted); }

/* ---------- steps ---------- */
.steps { padding-block: 3rem 4rem; border-top: 1px solid var(--line); }
.steps ol { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.6rem 2rem; counter-reset: s; }
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 8px;
  background: var(--sign); color: #fff; font-weight: 800; margin-bottom: .8rem;
}
.steps h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); max-width: 34ch; }

footer.site { background: var(--ink); color: #dfe3df; padding-block: 2.2rem; font-size: .9375rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
footer.site a { color: #fff; }
footer.site p { margin: .15rem 0; }
footer.site .wa { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }
footer.site .wa span { text-decoration: underline; text-underline-offset: 2px; }
footer.site .wa:hover span { color: #25D366; }
footer.site .wa-icon { flex: none; }

/* ---------- booking dialog ---------- */
dialog.book {
  border: 0; padding: 0; border-radius: 18px; width: min(1000px, 100% - 1.5rem); max-height: calc(100dvh - 1.5rem);
  background: var(--paper); color: var(--ink);
}
dialog.book::backdrop { background: rgba(20, 28, 40, .55); }
.book-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.book-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.icon-btn { border: 0; background: var(--bg); width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.book-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; padding: 1.4rem 1.5rem 1.6rem; }
@media (max-width: 860px) { .book-body { grid-template-columns: 1fr; gap: 1.4rem; padding: 1.1rem; } }
.hint { color: var(--muted); font-size: .9375rem; margin: 0 0 .8rem; }
.summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem;
  background: var(--plate-soft); border-radius: 10px; padding: .75rem 1rem; margin-top: 1rem; font-size: .9375rem;
}
.summary strong { font-size: 1.05rem; }
.summary .est { color: var(--muted); }
.summary .est b { color: var(--ink); }
/* "Included in the price" box under the calendar */
.included { margin-top: 1rem; background: var(--bg); border-radius: 10px; padding: .9rem 1rem; font-size: .9375rem; }
.included h3 { margin: 0 0 .45rem; font-size: 1rem; }
.included ul { list-style: none; padding: 0; margin: 0 0 .55rem; display: grid; gap: .25rem; }
.included li { display: flex; gap: .45rem; }
.included li::before { content: "✓"; color: var(--free); font-weight: 800; }
.included p { margin: 0; color: var(--muted); font-size: .875rem; }

/* calendar */
.cal { position: relative; }
.cal-nav { position: absolute; inset: -.2rem 0 auto auto; display: flex; gap: .3rem; }
.cal-arrow { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.cal-arrow:disabled { opacity: .35; cursor: default; }
.cal-months { display: grid; grid-template-columns: repeat(var(--months, 1), minmax(0, 1fr)); gap: 1.6rem; }
.cal-title { font-weight: 700; text-transform: capitalize; margin: .2rem 0 .7rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 0; }
.cal-wd { font-size: .75rem; color: var(--muted); text-align: center; padding-bottom: .3rem; text-transform: capitalize; }
.day {
  height: 2.6rem; border: 0; background: transparent; border-radius: 9px; padding: 0; cursor: pointer; font-size: .9375rem;
  font-variant-numeric: tabular-nums; position: relative;
}
.day:hover:not(:disabled) { background: var(--bg); }
.day.today { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.day.past { color: #b3b9b4; cursor: default; }
.day.busy {
  cursor: not-allowed; color: var(--busy); text-decoration: line-through;
  background: repeating-linear-gradient(135deg, rgba(181,67,47,.13) 0 4px, transparent 4px 8px);
}
.day.in-range, .day.preview { background: var(--plate-soft); border-radius: 0; }
.day.sel-start, .day.sel-end { background: var(--plate); font-weight: 800; color: var(--ink); }
.day.sel-start { border-radius: 9px 0 0 9px; }
.day.sel-end { border-radius: 0 9px 9px 0; }
.day.sel-start:not(.sel-end):only-child, .day.sel-single { border-radius: 9px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .8125rem; color: var(--muted); margin-top: .9rem; }
.lg { display: inline-flex; align-items: center; gap: .4rem; }
.lg::before { content: ""; width: .95rem; height: .95rem; border-radius: 4px; border: 1px solid var(--line); }
.lg.busy::before { background: repeating-linear-gradient(135deg, rgba(181,67,47,.35) 0 3px, transparent 3px 6px); border-color: transparent; }
.lg.sel::before { background: var(--plate); border-color: var(--plate); }

/* form */
.form { display: grid; gap: .9rem; align-content: start; }
.form h3 { margin: .4rem 0 0; font-size: 1.05rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: .3rem; font-size: .875rem; font-weight: 500; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--line); border-radius: 9px; padding: .62rem .75rem; background: #fff; font-size: 1rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sign); box-shadow: 0 0 0 3px rgba(31,79,163,.15); }
.field textarea { min-height: 4.5rem; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .875rem; }
.check input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--sign); flex: none; }
.hp { position: absolute; left: -9999px; }
.error { background: #fbe9e5; color: #8a2a18; border-radius: 9px; padding: .7rem .9rem; font-size: .9375rem; margin: 0; }
.error:empty { display: none; }
.submit { width: 100%; padding: .95rem; font-size: 1.05rem; }

/* success + booking page panels */
.done { padding: 2.2rem 1.6rem 2.4rem; max-width: 560px; }
.done h2 { margin: 0 0 .6rem; font-size: 1.8rem; letter-spacing: -.015em; }
.done p { margin: 0 0 .9rem; }
.ref-plate {
  display: inline-block; font-weight: 800; font-size: 1.5rem; letter-spacing: .08em; background: #fff; color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 8px; padding: .25rem .9rem; margin: .2rem 0 1rem;
  box-shadow: inset 1.6rem 0 0 var(--sign); padding-left: 2.3rem;
}
.muted { color: var(--muted); }

.page { padding-block: 2rem 4rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; max-width: 640px; }
.panel h1 { margin: 0 0 1rem; font-size: 2rem; letter-spacing: -.02em; }
.notice { border-radius: 10px; padding: .9rem 1rem; margin: 0 0 1.2rem; }
.notice.ok { background: #e6f0de; color: #2b4c1b; }
.notice.warn { background: var(--plate-soft); color: #5a4300; }
.notice.bad { background: #fbe9e5; color: #8a2a18; }
.details { width: 100%; border-collapse: collapse; margin: .4rem 0 1.4rem; }
.details th { text-align: left; font-weight: 500; color: var(--muted); padding: .55rem 1rem .55rem 0; width: 38%; vertical-align: top; }
.details td { padding: .55rem 0; font-weight: 600; }
.details tr + tr > * { border-top: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn.go { background: var(--free); }
.btn.go:hover { background: #335822; }
.btn.danger { background: transparent; color: var(--busy); box-shadow: inset 0 0 0 1.5px var(--busy); }
.btn.danger.armed { background: var(--busy); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .sign { animation: sign-in .6s cubic-bezier(.2,.8,.2,1) both .1s; }
  @keyframes sign-in { from { transform: translateY(14px) rotate(-1.2deg); opacity: 0; } }
}
