/* Polish Footprints: Istanbul - website styles.
   Series look of the "Footprints" guides (British Footprints: Istanbul came first): ink/cream paper,
   the cobalt Iznik tile with its cream and turquoise frame, Playfair Display + Lora.
   This nation's accent is the white-over-red sash of the app icon; it replaces the British brass
   on rules, frames and markers. Dark ("the book by lamplight") is the default; light follows the
   system or the toggle. */

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("fonts/Lora.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("fonts/Lora-Italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root,
:root[data-theme="dark"] {
  --paper: #0f1722;
  --card: #1a2433;
  --deep: #243043;
  --ink: #ece3d0;
  --ink-soft: #b5ad9d;
  --primary: #9fb7e8;
  --on-primary: #0f1722;
  --turq: #5ecbc4;
  --sash-white: #ffffff;
  --sash-red: #dc143c;
  --sash-deep: #b01030;
  --red-text: #f58c9a;      /* red for text and icons: AA on --card */
  --frame: #e9dfc9;         /* the icon's cream frame */
  --hairline: #33405a;
  --tile-1: #ffffff;
  --tile-2: #5ecbc4;
  --tile-3: #dc143c;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --paper: #f4ecdc;
    --card: #fbf6ea;
    --deep: #eadfc9;
    --ink: #1a2230;
    --ink-soft: #4e5664;
    --primary: #1e3f7a;
    --on-primary: #fbf6ea;
    --turq: #1f8a86;
    --red-text: #a50e2c;
    --frame: #1e3f7a;
    --hairline: #d7cbb2;
    --tile-1: #1e3f7a;
    --tile-2: #1f8a86;
    --tile-3: #c8102e;
    --shadow: 0 8px 24px rgba(60, 45, 20, 0.12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --paper: #f4ecdc;
  --card: #fbf6ea;
  --deep: #eadfc9;
  --ink: #1a2230;
  --ink-soft: #4e5664;
  --primary: #1e3f7a;
  --on-primary: #fbf6ea;
  --turq: #1f8a86;
  --red-text: #a50e2c;
  --frame: #1e3f7a;
  --hairline: #d7cbb2;
  --tile-1: #1e3f7a;
  --tile-2: #1f8a86;
  --tile-3: #c8102e;
  --shadow: 0 8px 24px rgba(60, 45, 20, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--turq); outline-offset: 3px; border-radius: 4px; }
code { font-size: 0.9em; background: var(--deep); padding: 0.05em 0.35em; border-radius: 4px; }
h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.15;
  margin: 0 0 0.4em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(1100px, 100% - 2rem); margin-inline: auto; }
.container.narrow { width: min(780px, 100% - 2rem); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--primary); color: var(--on-primary); padding: 0.5rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* The sash: a white band over a red one, as on the app icon. */
.sash-line, .tile-rule::after, .tile-rule.center::before {
  background: linear-gradient(var(--sash-white) 50%, var(--sash-red) 50%);
}
:root[data-theme="light"] .tile-rule::after,
:root[data-theme="light"] .tile-rule.center::before { box-shadow: 0 0 0 0.5px color-mix(in srgb, var(--sash-deep) 45%, transparent); }

/* Tile rule: a short sash with three tile diamonds (white, turquoise, red) */
.tile-rule {
  display: flex; align-items: center; gap: 7px; margin: 0.2rem 0 1.2rem; height: 10px;
}
.tile-rule::after { content: ""; flex: 1; height: 4px; max-width: 420px; }
.tile-rule i { width: 7px; height: 7px; transform: rotate(45deg); flex: none; }
.tile-rule i:nth-child(1) { background: var(--tile-1); }
.tile-rule i:nth-child(2) { background: var(--tile-2); }
.tile-rule i:nth-child(3) { background: var(--tile-3); }
.tile-rule.center { justify-content: center; }
.tile-rule.center::before { content: ""; flex: 1; height: 4px; max-width: 320px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: linear-gradient(var(--sash-white) 50%, var(--sash-red) 50%);
}
.header-inner {
  display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap;
  padding-block: 0.6rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand-icon { border-radius: 9px; box-shadow: 0 0 0 1px var(--hairline); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.1rem; }
.brand-sub {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--turq);
}
.nav { display: flex; gap: 0.25rem; order: 3; width: 100%; flex-wrap: wrap; }
.nav-link {
  color: var(--ink-soft); text-decoration: none; padding: 0.35rem 0.7rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
}
.nav-link:hover { color: var(--ink); background: var(--deep); }
.nav-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--turq); border-radius: 0; }
.tools { display: flex; align-items: center; gap: 0.5rem; }
.lang-switch { display: inline-flex; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.lang-btn {
  font: 600 0.85rem "Lora", Georgia, serif; letter-spacing: 0.06em;
  background: transparent; color: var(--ink-soft); border: 0; padding: 0.4rem 0.5rem; cursor: pointer; min-width: 40px; min-height: 36px;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--hairline); }
.lang-btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.theme-btn {
  display: inline-grid; place-items: center; width: 40px; height: 38px; cursor: pointer;
  background: transparent; color: var(--primary); border: 1px solid var(--hairline); border-radius: 10px;
}
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }
@media (min-width: 760px) {
  .nav { order: 0; width: auto; }
}

/* Hero: the series' cobalt tile crossed by the sash, with the compass rose (assets/img/hero.svg) */
.hero { position: relative; }
.hero-art { position: relative; display: block; background: #16305f; }
.hero-art img {
  width: 100%; height: clamp(220px, 40vw, 520px); object-fit: cover; object-position: 72% 50%;
}
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--paper));
}
.folio {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow), inset 0 0 0 4px var(--card), inset 0 0 0 5px color-mix(in srgb, var(--frame) 70%, transparent),
    inset 0 0 0 9px var(--card), inset 0 0 0 10px color-mix(in srgb, var(--turq) 55%, transparent);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.hero-card { position: relative; margin-top: clamp(-120px, -9vw, -40px); max-width: 880px; }
.eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--turq); margin-bottom: 0.6rem;
}
.lead { font-size: 1.15rem; color: var(--ink); }
.stats {
  list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem;
  color: var(--ink-soft); border-top: 1px solid var(--hairline); padding-top: 1rem;
}
.stats strong { font-family: "Playfair Display", Georgia, serif; font-size: 1.5rem; color: var(--ink); margin-right: 0.2em; }
:root[data-theme="light"] .stats strong { color: var(--red-text); }

/* Store button (placeholder until the app is live; see README) */
.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }
.store-btn {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 54px; padding: 0.45rem 1.1rem 0.45rem 0.85rem;
  border-radius: 10px; text-decoration: none; background: var(--primary); color: var(--on-primary);
  border: 1px solid var(--frame);
}
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn small { font-size: 0.75rem; }
.store-btn strong { font-size: 1.1rem; }
.store-btn:hover { filter: brightness(1.08); }
.store-btn[data-placeholder] { cursor: default; }
.store-soon { margin: 0.6rem 0 0; font-style: italic; color: var(--ink-soft); font-size: 0.95rem; }
.store-soon:empty { display: none; }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section.alt { background: color-mix(in srgb, var(--card) 55%, var(--paper)); border-block: 1px solid var(--hairline); }
.section-lead { color: var(--ink-soft); max-width: 62ch; font-size: 1.08rem; }
.card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 4px color-mix(in srgb, var(--hairline) 70%, transparent);
  padding: 1.4rem 1.4rem 1.1rem;
}

/* Themes: one card per chapter, marked with the app's category colour */
.themes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); margin-top: 1.5rem; }
.theme { border-top: 4px solid var(--cat, var(--sash-red)); border-radius: 4px 4px 6px 6px; }
.theme h3 { font-size: 1.15rem; }
.theme p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.feature p { color: var(--ink-soft); margin: 0; }
.f-icon {
  width: 34px; height: 34px; fill: none; stroke: var(--red-text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 0.6rem;
}

/* Walks */
.walks { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: walk; display: grid; gap: 0 2rem; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.walk { counter-increment: walk; position: relative; padding: 0.9rem 0 0.9rem 3rem; border-bottom: 1px solid var(--hairline); }
.walk::before {
  content: counter(walk); position: absolute; left: 0; top: 0.95rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; font: 700 1rem "Playfair Display", Georgia, serif;
  color: var(--ink); border: 2px solid var(--red-text);
}
.walk.free::before { border-color: var(--turq); }
.walk-name { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.12rem; margin: 0 0 0.2rem; line-height: 1.3; }
.walk-meta { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.tag {
  display: inline-block; vertical-align: 0.15em; margin-left: 0.3rem; font: 700 0.68rem "Lora", Georgia, serif; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--turq); border: 1px solid var(--turq); border-radius: 4px; padding: 0.05rem 0.4rem;
}

.offer { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); margin-top: 1.5rem; }
.ticket {
  display: inline-block; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.25rem 0.8rem; border-radius: 4px; border: 1px solid var(--turq); color: var(--turq); margin-bottom: 0.9rem;
}
.ticket.sash { border-color: var(--red-text); color: var(--red-text); }
.offer-card.unlock { border-color: color-mix(in srgb, var(--sash-red) 70%, var(--hairline)); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 1.7rem; margin-bottom: 0.55rem; }
.checks li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.55em; width: 8px; height: 8px; transform: rotate(45deg);
  background: var(--turq);
}
.unlock .checks li::before { background: var(--sash-red); }
.note { color: var(--ink-soft); font-style: italic; margin-top: 1.2rem; }

/* Screenshot gallery (only rendered when assets/img/screens/screens.json lists pictures) */
.gallery {
  display: flex; gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 1.5rem max(1rem, (100% - 1100px) / 2) 1rem;
  scrollbar-color: var(--sash-red) transparent;
}
.shot { flex: 0 0 min(240px, 66vw); margin: 0; scroll-snap-align: center; }
.shot img { border-radius: 22px; border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.shot figcaption { font-style: italic; font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.7rem; line-height: 1.45; }
@media (min-width: 1000px) {
  .shot { flex: 1 1 0; min-width: 0; }
}

/* FAQ */
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 1.35rem; width: 9px; height: 9px;
  border-right: 2px solid var(--red-text); border-bottom: 2px solid var(--red-text); transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq details p { color: var(--ink-soft); margin: 0 0 1.1rem; }

.cta-card { text-align: center; max-width: 720px; margin-inline: auto; }
.cta-card .stores { justify-content: center; }
.cta-icon { margin: 0 auto 1rem; border-radius: 20px; box-shadow: 0 0 0 1px var(--hairline); }

/* Inner pages */
.page { padding-block: 2.5rem 4rem; }
.page-head { margin-bottom: 1.5rem; }
.summary h2 { font-size: 1.35rem; }
.summary { margin-bottom: 2.5rem; }
.facts { display: grid; gap: 0.6rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); margin: 1.2rem 0 0; border-top: 1px solid var(--hairline); padding-top: 1rem; }
.facts dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: 0; }
.policy-section { margin-bottom: 2.4rem; }
.policy-section h2 { font-size: 1.5rem; padding-bottom: 0.35rem; border-bottom: 2px solid color-mix(in srgb, var(--sash-red) 75%, transparent); }
.policy-section h3 { margin-top: 1.4rem; }
.bullets { padding-left: 1.2rem; }
.bullets li { margin-bottom: 0.6rem; }
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--hairline); }
th { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.small { font-size: 0.92rem; color: var(--ink-soft); }
.updated { font-style: italic; color: var(--ink-soft); border-top: 1px solid var(--hairline); padding-top: 1rem; }
.contact-card { margin-bottom: 2.5rem; }
.mail { font-size: 1.35rem; margin-bottom: 0.4rem; }
.mail-link { font-family: "Playfair Display", Georgia, serif; font-weight: 700; }

/* Footer */
.site-footer { padding-block: 2rem 3rem; color: var(--ink-soft); font-size: 0.95rem; text-align: center; }
.footer-inner p { margin: 0 auto 0.5rem; max-width: 70ch; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem 1.2rem; margin: 1rem 0; }
