/* Bandırma Planı. Page styles on top of scrollcraft.css.
   Light paper ground, deep sea-blue ink, one ferry-yellow accent, one family. */

:root {
  --sc-canvas:     #F2F3EE;
  --sc-surface:    #FCFCFA;
  --sc-ink:        #0E2A47;
  --sc-ink-soft:   #48607A;
  --sc-accent:     #F4C430;
  --sc-accent-ink: #0E2A47;

  --sc-font-display: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sc-font-text:    "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sc-font-mono:    "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Light canvas: shadows halved and tinted to the ink, edge light goes white. */
  --sc-shadow-color: 212 45% 22%;
  --sc-e1: 0 1px 2px hsl(var(--sc-shadow-color) / 0.10),
           0 2px 6px -1px hsl(var(--sc-shadow-color) / 0.08);
  --sc-e2: 0 2px 4px hsl(var(--sc-shadow-color) / 0.10),
           0 8px 18px -4px hsl(var(--sc-shadow-color) / 0.14);
  --sc-edge: inset 0 1px 0 #fff;

  --nav-h: 3.25rem;
  --strip-h: 4.75rem;   /* measured and overwritten by app.js */
}

/* Yellow on paper is ~1.5:1, so the focus ring is ink. */
:focus-visible { outline-color: var(--sc-ink); }
::selection { background: var(--sc-accent); color: var(--sc-accent-ink); }

html { scroll-padding-top: var(--nav-h); }
body { font-weight: 400; }
[hidden] { display: none !important; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.sc-display { font-weight: 600; }
.sc-label { font-weight: 500; }

/* ---------------------------------------------------------- backdrop -- */
/* One fixed stage behind everything. Sized in lvh so the phone's URL bar
   collapsing does not rescale the photo under the reader's thumb. */
.bg {
  position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh;
  z-index: 0; overflow: clip; pointer-events: none;
  background: var(--sc-canvas);
}
.bg__layer { position: absolute; inset: 0; opacity: 0; will-change: opacity, transform; }
.bg__layer:first-child { opacity: 1; }
.bg__layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* A thin paper wash ties six different photographs to one light page. */
.bg__wash { position: absolute; inset: 0; background: var(--sc-canvas); opacity: 0.2; }
main { position: relative; z-index: 1; }

/* A paper label. Loose text never sits on a photograph directly. */
.plate {
  width: fit-content; max-width: 100%;
  padding: var(--sc-5);
  background: color-mix(in oklab, var(--sc-canvas) 95%, transparent);
  border-radius: 16px;
  box-shadow: var(--sc-e2);
}

/* ------------------------------------------------------------- index -- */
.index {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--sc-gutter);
  background: var(--sc-canvas);
  border-bottom: 1px solid var(--sc-hairline);
}
.index__mark {
  font-weight: 600; letter-spacing: var(--sc-track-snug);
  text-decoration: none; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
.index__nav { display: flex; gap: var(--sc-2); }
.index__nav a {
  position: relative;
  min-height: 44px; padding-inline: var(--sc-3);
  display: inline-flex; align-items: center;
  font-size: var(--sc-t-sm); font-weight: 500;
  color: var(--sc-ink-soft); text-decoration: none;
  transition: color var(--sc-d-fast) var(--sc-ease-out);
}
.index__nav a::after {
  content: ""; position: absolute; left: var(--sc-3); right: var(--sc-3); bottom: 8px;
  height: 2px; background: var(--sc-ink);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--sc-d-base) var(--sc-ease-out);
}
.index__nav a[aria-current="true"] { color: var(--sc-ink); }
.index__nav a[aria-current="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .index__nav a:hover { color: var(--sc-ink); }
}

/* ------------------------------------------------------------- hello -- */
/* The label sits low, above the strip, and the seafront fills the rest. */
.hello {
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-top: calc(var(--nav-h) + var(--sc-6));
  padding-bottom: calc(var(--strip-h) + var(--sc-5));
}
.hello .plate { padding: var(--sc-6) var(--sc-6) var(--sc-5); }
.hello__title {
  font-size: clamp(2.75rem, 1.6rem + 5.4vw, 6rem);
  margin-top: var(--sc-4);
}
.hello .sc-lede { margin-top: var(--sc-5); max-width: 30ch; }

.route {
  list-style: none; margin: var(--sc-6) 0 0; padding: 0;
  display: flex; align-items: flex-start;
  max-width: 30rem;
}
.route li { flex: 1; position: relative; }
/* The line between stops. Sits behind the icons, at their vertical centre. */
.route li + li::before {
  content: ""; position: absolute; top: 1.5rem; right: calc(50% + 2rem); width: calc(100% - 4rem);
  border-top: 1px dashed var(--sc-hairline-strong);
}
.route a {
  display: flex; flex-direction: column; align-items: center; gap: var(--sc-2);
  min-height: 44px;
  font-size: var(--sc-t-sm); font-weight: 500; text-decoration: none;
}
.route svg, .chapter__icon svg {
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.route svg { width: 3rem; height: 3rem; }

/* --------------------------------------------------------- the object -- */
/* One schema for every spot: name, fact, address, hours, pick, map. */
.spot {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--sc-surface);
  border: 1px solid var(--sc-hairline-strong);
  border-radius: var(--sc-r-md);
  box-shadow: var(--sc-e1), var(--sc-edge);
  transition: background-color var(--sc-d-fast) var(--sc-ease-out),
              border-color var(--sc-d-fast) var(--sc-ease-out),
              box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.spot__radio {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px;
  opacity: 0; margin: 0; pointer-events: none;
}
.spot__card {
  flex: 1;
  display: flex; flex-direction: column; gap: var(--sc-2);
  padding: var(--sc-5) var(--sc-5) var(--sc-3);
  cursor: pointer;
  border-radius: var(--sc-r-md);
  -webkit-tap-highlight-color: transparent;
}
.spot__radio:focus-visible + .spot__card {
  outline: 2px solid var(--sc-ink); outline-offset: 3px;
}
.spot__name {
  font-size: var(--sc-t-lg); font-weight: 600;
  line-height: 1.15; letter-spacing: var(--sc-track-snug);
  text-wrap: balance;
}
.spot__fact { color: var(--sc-ink); line-height: 1.45; text-wrap: pretty; }
.spot__meta {
  margin-top: auto; padding-top: var(--sc-3);
  display: grid; gap: var(--sc-1);
  font-size: var(--sc-t-sm); line-height: 1.4; color: var(--sc-ink-soft);
}
.spot__meta b { font-weight: 600; color: var(--sc-ink); }
.spot__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-3);
  padding: 0 var(--sc-3) var(--sc-3) var(--sc-5);
}
.spot__pick {
  min-height: 44px; min-width: 6.5rem; padding-inline: var(--sc-4);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sc-2);
  border: 1px solid var(--sc-ink); border-radius: var(--sc-r-pill);
  font-size: var(--sc-t-sm); font-weight: 600;
  cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--sc-d-fast) var(--sc-ease-out),
              color var(--sc-d-fast) var(--sc-ease-out),
              transform 120ms var(--sc-ease-out);
}
.spot__pick:active { transform: scale(0.97); }
.spot__pick .on { display: none; }
.spot__pick svg {
  width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.spot__map {
  min-height: 44px; padding-inline: var(--sc-3);
  display: inline-flex; align-items: center;
  font-size: var(--sc-t-sm); font-weight: 500;
  white-space: nowrap;
}

/* Picked: the accent owns the whole object, ink carries every line of text
   (ink-soft on yellow is under 4.5:1). */
.spot.is-picked {
  background: var(--sc-accent);
  border-color: var(--sc-ink);
  box-shadow: var(--sc-e2);
}
.spot.is-picked .spot__meta { color: var(--sc-ink); }
.spot.is-picked .spot__pick { background: var(--sc-ink); color: var(--sc-surface); }
.spot.is-picked .spot__pick .on { display: inline-flex; align-items: center; gap: var(--sc-2); }
.spot.is-picked .spot__pick .off { display: none; }

@media (hover: hover) and (pointer: fine) {
  .spot:not(.is-picked):hover { border-color: var(--sc-ink); box-shadow: var(--sc-e2), var(--sc-edge); }
  .spot:not(.is-picked) .spot__pick:hover { background: var(--sc-ink); color: var(--sc-surface); }
}

/* ------------------------------------------------------ İçecek: rail -- */
.railstage {
  display: flex; flex-direction: column; justify-content: center;
  gap: var(--sc-5);
  padding-top: var(--nav-h);
  padding-bottom: var(--strip-h);   /* the strip never covers a card */
  touch-action: pan-y;
}
/* Under reduced motion the stage becomes a sideways scroll region; sticky
   keeps the heading in place while the cards move under it. */
.railstage__head { position: sticky; left: 0; }
.railstage__head .sc-body { margin-top: var(--sc-2); }
.rail {
  position: relative;
  width: max-content; align-self: flex-start;
  gap: var(--sc-4);
  padding-inline: var(--sc-gutter);
  align-items: stretch;
}
.rail .spot { flex: 0 0 auto; width: min(78vw, 24rem); }
@media (min-width: 861px) { .rail { gap: var(--sc-5); } }
@media (max-height: 560px) {
  .railstage { gap: var(--sc-3); }
  .railstage__head .sc-body { display: none; }
  .rail .spot__card { padding-top: var(--sc-4); }
}

/* ------------------------------------------------------- chapters -- */
.chapter__grid { display: grid; gap: var(--sc-7); }
.chapter__head { display: grid; gap: var(--sc-5); align-content: start; }
.chapter__head .sc-body { margin-top: var(--sc-3); }
.chapter__icon { margin: 0; width: clamp(5.5rem, 16vw, 9rem); color: var(--sc-ink); }

/* Yemek: a timetable board. Rows, not cards. */
.board { display: grid; gap: var(--sc-3); }
.board .spot__card { padding: var(--sc-4) var(--sc-4) var(--sc-2); gap: var(--sc-1); }
.board .spot__meta { padding-top: var(--sc-2); }
.board .spot__foot { padding-left: var(--sc-4); }
@media (min-width: 861px) {
  .chapter__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: var(--sc-8); }
  .chapter__head { position: sticky; top: calc(var(--nav-h) + var(--sc-7)); }
  .chapter__head.plate { align-self: start; width: auto; }
  .board .spot { flex-direction: row; align-items: stretch; }
  .board .spot__card {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: var(--sc-6); row-gap: var(--sc-1);
    padding: var(--sc-4) var(--sc-5);
    align-items: start;
  }
  .board .spot__name { grid-column: 1; }
  .board .spot__fact { grid-column: 1; }
  .board .spot__meta { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; padding-top: var(--sc-1); }
  .board .spot__foot {
    flex-direction: column-reverse; justify-content: center; align-items: flex-end;
    gap: 0; padding: var(--sc-2) var(--sc-4) var(--sc-2) 0;
  }
}

/* Aktivite: four objects you would pick up. */
.quad { display: grid; gap: var(--sc-4); margin-top: var(--sc-7); }
.quad > div { display: grid; }
.quad .spot__name { font-size: var(--sc-t-xl); }
.quad .spot__card { padding-top: var(--sc-6); min-height: 11rem; }
@media (min-width: 700px) {
  .quad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-5); }
  /* Offset the second column so the four do not read as a tidy matrix. */
  .quad > div:nth-child(even) { margin-top: var(--sc-7); margin-bottom: calc(var(--sc-7) * -1); }
  .quad { padding-bottom: var(--sc-7); }
}

/* ---------------------------------------------------- Gün & saat -- */
.when { padding-bottom: calc(var(--sc-section) + var(--strip-h)); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sc-2); }
.sc-stack > .chips { margin-top: var(--sc-5); }
.chip {
  min-height: 44px; padding-inline: var(--sc-4);
  background: var(--sc-surface);
  border: 1px solid var(--sc-hairline-strong); border-radius: var(--sc-r-pill);
  font-weight: 500; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--sc-d-fast) var(--sc-ease-out),
              border-color var(--sc-d-fast) var(--sc-ease-out),
              transform 120ms var(--sc-ease-out);
}
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--sc-accent); border-color: var(--sc-ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--sc-ink); } }
.credits { margin: var(--sc-4) 0 0; font-size: var(--sc-t-xs); color: var(--sc-ink-soft); }
.credits a { display: inline-flex; align-items: center; min-height: 44px; }
.hints { min-height: 1.5em; font-size: var(--sc-t-sm); font-weight: 500; color: var(--sc-ink); margin: var(--sc-5) 0 0; }

/* ----------------------------------------------------------- Özet -- */
/* The heading sits directly on top of the opened card, so the two read as one
   object. --plan-h is the card's measured height (app.js). */
.closing {
  display: flex; align-items: flex-end;
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--plan-h, 24rem) + var(--sc-5));
}
.closing .sc-wrap { max-width: 44rem; padding-inline: 0; }
.closing .plate { margin-inline: var(--sc-3); }
.closing .sc-body { margin-top: var(--sc-3); }

/* ------------------------------------------------- the plan strip -- */
/* One fixed element. Collapsed, only its top --strip-h shows: the three slots.
   --lift (0..1, written by app.js from scroll) raises the rest into view. */
.plan {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  margin-inline: auto; width: 100%; max-width: 44rem;
  background: var(--sc-surface);
  border: 1px solid var(--sc-hairline-strong); border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 26px -10px hsl(var(--sc-shadow-color) / 0.22), var(--sc-edge);
  transform: translate3d(0, calc((1 - var(--lift, 0)) * (100% - var(--strip-h))), 0);
  will-change: transform;
}
.plan__compact {
  position: absolute; inset: 0 0 auto 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  opacity: calc(1 - var(--lift, 0) * 2.2);
}
.plan.is-open .plan__compact { visibility: hidden; }
.plan:not(.is-open) .plan__full { visibility: hidden; }

.slot {
  min-height: 56px; padding: 6px 10px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--sc-hairline-strong); border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--sc-d-base) var(--sc-ease-out),
              border-color var(--sc-d-base) var(--sc-ease-out);
}
.slot__k {
  font-size: 0.6875rem; font-weight: 600; line-height: 1.2;
  letter-spacing: var(--sc-track-wide); text-transform: uppercase;
  color: var(--sc-ink-soft);
}
.slot__v {
  font-size: 0.8125rem; font-weight: 500; line-height: 1.2; color: var(--sc-ink-soft);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden;
}
.slot.is-filled { background: var(--sc-accent); border-color: var(--sc-ink); }
.slot.is-filled .slot__k, .slot.is-filled .slot__v { color: var(--sc-ink); }
.slot.is-filled .slot__v { font-weight: 600; }
.slot.pop { animation: slot-pop 320ms var(--sc-ease-out); }
@keyframes slot-pop {
  from { transform: scale(0.95); opacity: 0.4; }
  to   { transform: none; opacity: 1; }
}

.plan__go {
  width: 48px; min-height: 56px;
  display: grid; place-items: center;
  border: 1px solid var(--sc-ink); border-radius: 10px;
  color: var(--sc-ink);
  transition: background-color var(--sc-d-base) var(--sc-ease-out), color var(--sc-d-base) var(--sc-ease-out);
}
.plan__go svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plan.is-ready .plan__go { background: var(--sc-ink); color: var(--sc-surface); }

.plan__full {
  padding: var(--sc-4) var(--sc-5) calc(var(--sc-4) + env(safe-area-inset-bottom, 0px));
  max-height: calc(100svh - var(--nav-h) - 6.5rem);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: calc((var(--lift, 0) - 0.4) * 2.2);
}
.plan__rows { list-style: none; margin: 0; padding: 0; }
.plan__rows li + li { border-top: 1px solid var(--sc-hairline); }
.row {
  width: 100%; min-height: 52px; padding: var(--sc-2) 0;
  display: grid; grid-template-columns: 5.25rem minmax(0, 1fr) auto; align-items: center; gap: var(--sc-3);
  background: none; border: 0; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.row__k {
  font-size: var(--sc-t-xs); font-weight: 600;
  letter-spacing: var(--sc-track-wide); text-transform: uppercase;
  color: var(--sc-ink-soft);
}
.row__v { font-weight: 500; line-height: 1.25; color: var(--sc-ink-soft); }
.row.is-filled .row__v { font-weight: 600; color: var(--sc-ink); }
.row__edit { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.plan__when, .plan__hint { margin: 0; padding-block: var(--sc-2); font-size: var(--sc-t-sm); line-height: 1.4; }
.plan__when { border-top: 1px solid var(--sc-hairline); padding-top: var(--sc-3); font-weight: 500; }
.plan__hint { font-weight: 500; }

.send {
  margin-top: var(--sc-3);
  min-height: 56px; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  border: 1px solid var(--sc-ink); border-radius: var(--sc-r-md);
  font-size: var(--sc-t-lg); font-weight: 600; text-decoration: none;
  box-shadow: var(--sc-e2);
  transition: background-color var(--sc-d-base) var(--sc-ease-out),
              color var(--sc-d-base) var(--sc-ease-out),
              transform 120ms var(--sc-ease-out);
}
.send:active { transform: scale(0.98); }
.send[aria-disabled="true"] {
  background: transparent; color: var(--sc-ink-soft);
  border-color: var(--sc-hairline-strong); box-shadow: none;
  cursor: not-allowed;
}
.send[aria-disabled="true"]:active { transform: none; }
.plan__help { margin: var(--sc-3) 0 0; text-align: center; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }

/* ------------------------------------------------------------ phone -- */
@media (max-width: 700px) {
  .index { padding-inline: var(--sc-2); }
  .index__mark { display: none; }   /* the hello already says it */
  .index__nav { width: 100%; justify-content: space-between; gap: 0; }
  .sc-wrap { padding-inline: var(--sc-3); }
  .plate, .hello .plate { padding: var(--sc-5) var(--sc-4); }
  .rail { padding-inline: var(--sc-3); }
  .plan { border-inline: 0; }
  .row { grid-template-columns: 4.5rem minmax(0, 1fr) auto; }
}

/* --------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  /* The rail is swiped sideways here, so the act needs no pinned travel. */
  #icecek { height: auto !important; }
  .slot.pop { animation: none; }
  .plan__compact, .plan__full { transition: opacity 200ms linear; }
  .spot__pick:active, .chip:active, .send:active { transform: none; }
  .index__nav a::after { transition: none; }
  .bg__layer { transform: none !important; }
}
