/* Jaffna Travel Guide: warm editorial, photo-led. Self-hosted fonts (Fraunces + Inter, SIL OFL), no scripts. */
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff") format("woff"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff") format("woff"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  --bg: #f6f1e8;
  --surface: #fffdf9;
  --ink: #27211a;
  --muted: #5e5246;
  --line: #e2d8c6;
  --brand: #7a2f1d;
  --brand-hover: #5f2314;
  --on-brand: #ffffff;
  --link: #0c5a57;
  --tint: #ece3d2;
  --lagoon: #0c4243;
  --on-lagoon: #f3ece0;
  --gold: #f2b24a;
  --radius: 16px;
  --max: 72rem;
  --measure: 44rem;
  --serif: "Fraunces", Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e;
    --surface: #211a14;
    --ink: #f3e9dc;
    --muted: #c0ad99;
    --line: #3a2f26;
    --brand: #e9895f;
    --brand-hover: #f2a07c;
    --on-brand: #17120e;
    --link: #86d3cc;
    --tint: #261d16;
    --lagoon: #0a2f30;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
strong, b { font-weight: 600; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-brand); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 0; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.2) blur(12px); }
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1.5rem; padding-block: .8rem; }
.brand { font: 600 1.35rem/1.2 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--brand); }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--brand); }

/* Buttons */
.btn { display: inline-block; background: var(--brand); color: var(--on-brand); padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600; text-decoration: none; line-height: 1.2; border: 2px solid transparent; }
.btn:hover { background: var(--brand-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 82% 78%, rgba(255, 214, 153, .55) 0 7rem, rgba(255, 214, 153, 0) 7.1rem),
    linear-gradient(115deg, #4a1c10 0%, #8a3a22 55%, #a8532a 100%);
  background-size: cover;
  background-position: center;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
.hero.has-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(30, 12, 6, .82), rgba(30, 12, 6, .45) 48%, rgba(30, 12, 6, 0) 80%); }
.hero.has-photo h1, .hero.has-photo p { text-shadow: 0 2px 18px rgba(20, 8, 4, .55); }
.hero.has-photo { min-height: clamp(27rem, 54vw, 40rem); display: flex; align-items: center; overflow: hidden; }
.hero.has-photo .wrap { width: min(100% - 2rem, var(--max)); }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(3rem, 9vw, 7rem) clamp(5rem, 11vw, 8rem); }
.hero h1 { font: 600 clamp(2.5rem, 6.4vw, 4.4rem)/1.04 var(--serif); letter-spacing: -.02em; margin: 0 0 1.1rem; max-width: 14ch; }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.28rem); line-height: 1.6; max-width: 34rem; margin: 0 0 1.9rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 600; margin-bottom: .9rem; opacity: .95; color: var(--gold); }
.hero .btn { background: var(--gold); color: #2a160d; }
.hero .btn:hover { background: #ffc766; }
.hero .btn-ghost { background: transparent; color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 40rem) {
  .hero.has-photo { min-height: 32rem; align-items: flex-end; }
  .hero.has-photo::before { background: linear-gradient(180deg, rgba(30, 12, 6, .3) 0%, rgba(30, 12, 6, .8) 55%, rgba(30, 12, 6, .9) 100%); }
}

/* Trip at a glance */
.glance-wrap { position: relative; z-index: 5; margin-top: calc(-1 * clamp(2.75rem, 6vw, 4rem)); }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 40px -18px rgba(40, 18, 8, .35); overflow: hidden; }
.glance div { padding: 1.2rem 1.4rem; border-left: 1px solid var(--line); }
.glance div:first-child { border-left: 0; }
.glance dt { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 .3rem; }
.glance dd { margin: 0; font: 600 1.3rem/1.25 var(--serif); color: var(--ink); }
.glance dd small { display: block; font: 400 .88rem/1.4 var(--sans); color: var(--muted); margin-top: .2rem; }
.glance-note { text-align: right; margin: .6rem .25rem 0; font-size: .88rem; }
@media (max-width: 40rem) { .glance div { border-left: 0; border-top: 1px solid var(--line); } .glance div:first-child { border-top: 0; } .glance-note { text-align: left; } }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section.tint { background: var(--tint); }
.section h2 { font: 600 clamp(1.7rem, 3.6vw, 2.4rem)/1.15 var(--serif); letter-spacing: -.015em; margin: 0 0 .6rem; }
.section .lead { color: var(--muted); max-width: var(--measure); margin: 0 0 2rem; font-size: 1.08rem; }

/* Lagoon band */
.band { background: var(--lagoon); color: var(--on-lagoon); padding-block: clamp(3rem, 7vw, 5rem); }
.band h2 { font: 600 clamp(1.7rem, 3.6vw, 2.4rem)/1.15 var(--serif); letter-spacing: -.015em; margin: 0 0 .7rem; color: #fff; max-width: 22ch; }
.band .lead { max-width: 38rem; margin: 0 0 2rem; color: #d3e2df; font-size: 1.08rem; }
.band a:not(.btn) { color: #bfe6e1; }
.band-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-bottom: 2rem; }
.band-item { border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--radius); padding: 1.25rem 1.35rem; background: rgba(255, 255, 255, .05); }
.band-item h3 { font: 600 1.2rem/1.3 var(--serif); margin: 0 0 .4rem; color: #fff; }
.band-item p { margin: 0; color: #d3e2df; font-size: .98rem; line-height: 1.6; }
.band .btn { background: var(--gold); color: #2a160d; }
.band .btn:hover { background: #ffc766; }

.prose.guides-intro { width: auto; margin: 0 0 2rem; max-width: var(--measure); color: var(--muted); }

/* Cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #6b2a17, #b8602e); display: grid; place-items: center; color: rgba(255, 255, 255, .9); font: 600 3rem var(--serif); }
.card img.card-media { object-fit: cover; width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; }
.card-body { padding: 1.15rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card h3 { font: 600 1.28rem/1.25 var(--serif); letter-spacing: -.01em; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card:hover { border-color: var(--brand); box-shadow: 0 12px 28px rgba(74, 28, 16, .14); }
.card .more { margin-top: auto; padding-top: .6rem; color: var(--brand); font-weight: 600; font-size: .95rem; }

/* Article */
.page { padding-block: clamp(2rem, 5vw, 3.5rem); }
.page .wrap, .article-head { max-width: var(--measure); }
.article-head { margin-inline: auto; width: min(100% - 2rem, var(--measure)); }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
h1.title { font: 600 clamp(2.2rem, 5.4vw, 3.4rem)/1.08 var(--serif); letter-spacing: -.02em; margin: 0 0 .75rem; }
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 1.6rem; }
.aff-note { margin: -1rem 0 1.6rem; font-size: .88rem; color: var(--muted); }
.prose { width: min(100% - 2rem, var(--measure)); margin-inline: auto; }
.prose h2 { font: 600 clamp(1.6rem, 3.2vw, 2.05rem)/1.2 var(--serif); letter-spacing: -.015em; margin: 3.2rem 0 .8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); position: relative; }
.prose h2::before { content: ""; position: absolute; top: -2px; left: 0; width: 3.5rem; height: 3px; background: var(--brand); border-radius: 2px; }
.prose h3 { font: 600 1.3rem/1.3 var(--serif); margin: 2rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--brand); }
.prose blockquote { margin: 1.6rem 0; padding: 1.1rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 2rem 0; }
.prose figure img { border-radius: 20px; width: 100%; height: auto; }
.prose h2 + figure { margin-top: 1rem; }
.prose figcaption { color: var(--muted); font-size: .9rem; margin-top: .6rem; }
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; min-width: 32rem; }
th, td { text-align: left; padding: .75rem 1rem; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--tint); font-weight: 600; font-size: .86rem; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.35rem; margin: 0 0 2rem; }
.toc summary { font-weight: 600; cursor: pointer; }
.toc ol { margin: .75rem 0 0; padding-left: 1.25rem; }
.toc li { margin-bottom: .25rem; }
@media (min-width: 46rem) { .toc ol { columns: 2; column-gap: 2rem; } .toc li { break-inside: avoid; } }
.sources { font-size: .95rem; color: var(--muted); }
.sources li { margin-bottom: .35rem; }

.share { margin: 3rem 0 1rem; padding: 1.3rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.share-title { font: 600 1.15rem/1.3 var(--serif); margin: 0 0 .8rem; }
.share-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.share-link { display: inline-block; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.share-link:hover { border-color: var(--brand); color: var(--brand); }
.share-follow { margin: .9rem 0 0; font-size: .95rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--lagoon); color: #c9dcd9; margin-top: 0; padding-block: 3rem 2rem; font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.site-footer a { color: #c9dcd9; }
.site-footer a:hover { color: #fff; }
.site-footer strong { color: #fff; font: 600 1.1rem var(--serif); }
.site-footer ul { list-style: none; margin: .6rem 0 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer p { margin: .6rem 0 0; }
.legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 1.1rem; font-size: .88rem; }

@media (prefers-reduced-motion: no-preference) {
  .card, .btn { transition: border-color .15s ease, background-color .15s ease, box-shadow .2s ease, transform .2s ease; }
  .card:hover { transform: translateY(-3px); }
}
@media print {
  .site-header, .site-footer, .toc, .skip, .band { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}

/* Jaffna from the air */
.aerial { padding-bottom: 0; }
.aerial-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .aerial-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.aerial-tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; color: #fff; text-decoration: none; background: #0c4243; }
@media (min-width: 48rem) { .aerial-tile { aspect-ratio: 3 / 4; } .aerial-tile:first-child { aspect-ratio: auto; } }
.aerial-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.aerial-tile:hover .aerial-img, .aerial-tile:focus-visible .aerial-img { transform: scale(1.04); }
.aerial-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 20, 0) 45%, rgba(10, 20, 20, .78) 100%); }
.aerial-cap { position: absolute; left: 1.1rem; right: 1.1rem; bottom: 1rem; z-index: 1; display: grid; gap: .2rem; font-size: .95rem; line-height: 1.4; }
.aerial-cap strong { font: 600 1.35rem/1.2 var(--serif); }
.aerial-credit { color: var(--muted); font-size: .85rem; margin: .8rem 0 0; }
@media (prefers-reduced-motion: reduce) { .aerial-img { transition: none; } }
