/* ==========================================================================
   Totally Sydney — Design System
   Palette + type derived from the brand mark (harbour bridge / opera house
   sunrise). See README.md → "Design system" for the rationale.
   ========================================================================== */

:root {
  /* ---- Colour tokens (from logo) -------------------------------------- */
  --navy-900: #072A4E;   /* deepest ink, footer bg */
  --navy-700: #0B3C6B;   /* primary brand navy — headings, header bg */
  --navy-600: #12507F;   /* hover state on navy */
  --teal-600: #1CAEC2;   /* harbour teal — links, accents */
  --teal-700: #128496;
  --teal-100: #E4F6F8;   /* pale teal tint for section backgrounds */
  --coral-500: #F2695A;  /* "Totally" coral — CTAs, highlights */
  --coral-600: #DE5142;
  --gold-500: #F5A93C;   /* sunshine gold — badges, ratings, small accents */
  --sand-300: #E8C591;   /* opera-house sand — warm neutral */
  --sand-100: #FBF3E4;
  --cream-50: #FBF9F5;   /* page background */
  --ink-900: #10202E;    /* body text */
  --ink-600: #3E5568;    /* secondary text */
  --ink-300: #92A2AE;    /* tertiary / placeholder */
  --line: #E3E2DC;       /* hairline borders */
  --white: #FFFFFF;

  /* ---- Type ------------------------------------------------------------ */
  --font-display: "Fraunces", "Noto Serif", Georgia, serif;
  --font-body: "Inter", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---- Layout ------------------------------------------------------------ */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(7,42,78,0.06), 0 1px 1px rgba(7,42,78,0.04);
  --shadow-md: 0 8px 24px rgba(7,42,78,0.10);
  --shadow-lg: 0 20px 48px rgba(7,42,78,0.16);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--cream-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--coral-600); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-700);
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.08rem; }
p { margin: 0 0 var(--space-3); }
ul, ol { padding-left: 1.3em; }
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
a.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy-700); color: #fff;
  padding: 0.6em 1em; z-index: 999; border-radius: 0 0 8px 0;
}
a.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--coral-500); outline-offset: 2px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 0.72em 1.4em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--coral-500); color: #fff; }
.btn-primary:hover { background: var(--coral-600); color: #fff; }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-navy { background: var(--navy-700); color: #fff; }
.btn-navy:hover { background: var(--navy-600); color: #fff; }
.btn-sm { padding: 0.5em 1.1em; font-size: 0.88rem; }

/* ---- Badges / eyebrows --------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal-700);
}
.badge {
  display: inline-flex; align-items: center; gap: 0.35em;
  background: var(--sand-100); color: var(--navy-700);
  border: 1px solid var(--sand-300); border-radius: 999px;
  padding: 0.28em 0.85em; font-size: 0.82rem; font-weight: 600;
}
.badge-teal { background: var(--teal-100); border-color: #BEE9EE; color: var(--teal-700); }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy-700);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding-block: 0.7rem;
}
.brand { display: flex; align-items: center; }
.brand img { height: 42px; width: auto; }
.brand-text { display: none; }
.primary-nav { display: none; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.primary-nav a {
  color: rgba(255,255,255,0.88); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 0.4em 0; border-bottom: 2px solid transparent;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--coral-500); }
.header-tools { display: flex; align-items: center; gap: 0.6rem; }
.lang-switcher { position: relative; }
.lang-switcher summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.4em;
  color: #fff; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px; padding: 0.42em 0.9em; font-size: 0.86rem; font-weight: 600;
}
.lang-switcher summary::-webkit-details-marker { display: none; }
.lang-switcher[open] summary { background: rgba(255,255,255,0.18); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: var(--ink-900);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 0.5rem;
  display: grid; grid-template-columns: repeat(2, minmax(140px,1fr)); gap: 2px; max-height: 60vh; overflow: auto;
  width: min(340px, 82vw);
}
.lang-menu a {
  display: flex; align-items: center; gap: 0.5em; padding: 0.5em 0.6em; border-radius: 8px;
  color: var(--ink-900); text-decoration: none; font-size: 0.88rem;
}
.lang-menu a:hover { background: var(--teal-100); }
.lang-menu a[aria-current="true"] { background: var(--sand-100); font-weight: 700; }
.menu-toggle {
  display: inline-flex; background: transparent; border: 0; color: #fff; padding: 0.4rem; cursor: pointer;
}
.menu-toggle svg { width: 26px; height: 26px; }

@media (min-width: 900px) {
  .brand-text { display: block; margin-left: 0.7rem; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
  .primary-nav { display: block; }
  .menu-toggle { display: none; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none; flex-direction: column; gap: 0.2rem; background: var(--navy-900);
  padding: 0.6rem var(--space-4) 1.2rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { color: rgba(255,255,255,0.92); text-decoration: none; padding: 0.65em 0.2em; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.08); }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative; background: linear-gradient(180deg, var(--navy-700) 0%, var(--navy-900) 100%);
  color: #fff; overflow: hidden; padding-block: var(--space-6) var(--space-7);
}
.hero .container { position: relative; z-index: 2; }
.hero-eyebrow { color: var(--gold-500); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero p.lead { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 50ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: var(--space-4); }
.hero-sun {
  position: absolute; top: -160px; right: -120px; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--gold-500), transparent 72%);
  opacity: 0.55; z-index: 1; pointer-events: none;
}
.wave-divider { display: block; width: 100%; line-height: 0; }
.wave-divider svg { width: 100%; height: auto; display: block; }

/* Search box */
.search-box { margin-top: var(--space-5); max-width: 560px; }
.search-box form { display: flex; background: #fff; border-radius: 999px; padding: 0.35rem; box-shadow: var(--shadow-lg); }
.search-box input {
  flex: 1; border: 0; background: transparent; padding: 0.65em 1em; font-size: 0.98rem; color: var(--ink-900); font-family: var(--font-body);
}
.search-box input:focus { outline: none; }
.search-box button {
  border: 0; background: var(--coral-500); color: #fff; border-radius: 999px; padding: 0 1.4em; font-weight: 700; cursor: pointer;
}
.search-results-panel {
  position: relative; margin-top: 0.5rem;
}
.search-results-list {
  position: absolute; left: 0; right: 0; top: 4px; background: #fff; color: var(--ink-900);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 20;
}
.search-results-list a { display: block; padding: 0.7em 1em; text-decoration: none; color: var(--ink-900); border-bottom: 1px solid var(--line); }
.search-results-list a:hover { background: var(--teal-100); }
.search-results-list .sr-cat { color: var(--teal-700); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.search-empty { padding: 0.9em 1em; color: var(--ink-600); font-size: 0.9rem; }

/* ---- Section scaffolding ------------------------------------------------ */
.section { padding-block: var(--space-6); }
.section-tight { padding-block: var(--space-5); }
.section-alt { background: var(--teal-100); }
.section-navy { background: var(--navy-700); color: #fff; }
.section-navy h2 { color: #fff; }
.section-head { max-width: 640px; margin-bottom: var(--space-5); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---- Stat strip ---------------------------------------------------------- */
.stat-strip {
  display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-4);
  margin-top: var(--space-5);
}
@media (min-width: 700px) { .stat-strip { grid-template-columns: repeat(4,1fr); } }
.stat { text-align: left; }
.stat .num { font-family: var(--font-display); font-size: 2rem; color: var(--gold-500); font-weight: 600; display: block; }
.stat .label { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

/* ---- Card grid ----------------------------------------------------------- */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2,1fr); } .grid-4 { grid-template-columns: repeat(2,1fr);} }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3,1fr); } .grid-4 { grid-template-columns: repeat(4,1fr);} }

.card {
  background: #fff; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease; display: flex; flex-direction: column; height: 100%;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card a.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.card-media { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--teal-600), var(--navy-700)); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .card-cat {
  position: absolute; left: 0.7rem; top: 0.7rem; background: rgba(7,42,78,0.78); color: #fff;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 0.3em 0.7em; border-radius: 999px;
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.card-body p { color: var(--ink-600); font-size: 0.94rem; margin-bottom: 0.7rem; }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--ink-600); }

/* Category / icon tiles */
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.4rem 1.2rem;
  text-decoration: none; color: var(--ink-900); display: flex; flex-direction: column; gap: 0.6rem;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.tile:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--teal-600); }
.tile .tile-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--teal-100); color: var(--teal-700);
}
.tile h3 { margin: 0; font-size: 1.05rem; color: var(--navy-700); }
.tile p { margin: 0; font-size: 0.88rem; color: var(--ink-600); }
.tile .tile-count { font-size: 0.78rem; color: var(--ink-300); font-weight: 600; }

/* ---- Breadcrumbs --------------------------------------------------------- */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-600); padding-block: 0.9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0; padding: 0; }
.breadcrumbs a { color: var(--ink-600); text-decoration: none; }
.breadcrumbs a:hover { color: var(--coral-600); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4em; color: var(--ink-300); }

/* ---- Article / page content ---------------------------------------------- */
.page-hero { background: var(--navy-700); color: #fff; padding-block: var(--space-5) var(--space-6); }
.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.page-hero .lead { color: rgba(255,255,255,0.85); max-width: 60ch; }
.article-layout { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 980px) { .article-layout { grid-template-columns: minmax(0,1fr) 300px; } }
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--space-5); }
.prose h3 { margin-top: var(--space-4); }
.prose ul, .prose ol { margin-bottom: var(--space-3); }
.prose li { margin-bottom: 0.35em; }
.prose img { border-radius: var(--radius-md); margin-block: var(--space-3); }
.prose blockquote {
  margin: var(--space-4) 0; padding: 0.9rem 1.2rem; border-left: 4px solid var(--coral-500);
  background: var(--sand-100); border-radius: 0 10px 10px 0; font-style: italic; color: var(--navy-700);
}
.callout {
  background: var(--teal-100); border: 1px solid #BEE9EE; border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem; margin: var(--space-4) 0;
}
.callout h4 { margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.4em; }
.toc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.1rem 1.2rem;
}
.toc h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-700); margin-bottom: 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.toc a { text-decoration: none; color: var(--ink-900); font-size: 0.9rem; }
.toc a:hover { color: var(--coral-600); }

aside.sidebar { display: flex; flex-direction: column; gap: var(--space-4); }
.sidebar-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.1rem 1.2rem; }
.sidebar-card h4 { font-size: 0.95rem; margin-bottom: 0.6rem; }
.sidebar-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-card a { text-decoration: none; font-size: 0.9rem; }

/* Day-by-day itinerary steps (legitimate sequence use of numbering) */
.itinerary-step { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; margin-bottom: var(--space-4); }
.itinerary-step .step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--navy-700); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600;
}

/* Author / updated meta */
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; color: rgba(255,255,255,0.78); font-size: 0.88rem; margin-top: 0.6rem;}
.meta-row .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

/* ---- CTA band ------------------------------------------------------------ */
.cta-band {
  background: linear-gradient(120deg, var(--coral-500), #ef8a58); color: #fff; border-radius: var(--radius-lg);
  padding: var(--space-5); text-align: center; margin-block: var(--space-6);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.92); max-width: 50ch; margin-inline: auto; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.82); padding-block: var(--space-6) var(--space-4); }
.footer-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; margin-bottom: var(--space-5); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.3fr repeat(3, 1fr); } }
.footer-brand img { height: 38px; margin-bottom: 0.8rem; }
.footer-brand p { color: rgba(255,255,255,0.68); font-size: 0.9rem; max-width: 32ch; }
.site-footer h4 { color: #fff; font-size: 0.88rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: var(--space-4);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem; font-size: 0.82rem; color: rgba(255,255,255,0.6);
}
.social-links { display: flex; gap: 0.7rem; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.social-links a:hover { background: rgba(255,255,255,0.18); }

/* ---- Utility -------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* RTL support (Arabic etc.) */
html[dir="rtl"] .itinerary-step { grid-template-columns: 1fr 44px; }
html[dir="rtl"] .itinerary-step .step-num { order: 2; }
html[dir="rtl"] .prose blockquote { border-left: none; border-right: 4px solid var(--coral-500); border-radius: 10px 0 0 10px; }
html[dir="rtl"] .breadcrumbs li:not(:last-child)::after { content: "\\"; }

/* Non-Latin script tuning */
html[lang^="zh"] body, html[lang^="ja"] body, html[lang^="ko"] body {
  font-family: "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", var(--font-body);
}
html[lang^="zh"] h1, html[lang^="zh"] h2, html[lang^="zh"] h3, html[lang^="zh"] h4,
html[lang^="ja"] h1, html[lang^="ja"] h2, html[lang^="ja"] h3, html[lang^="ja"] h4,
html[lang^="ko"] h1, html[lang^="ko"] h2, html[lang^="ko"] h3, html[lang^="ko"] h4 {
  font-family: "Noto Serif SC", "Noto Serif JP", "Noto Serif KR", var(--font-display);
}
html[lang="ar"] body, html[lang="he"] body { font-family: "Noto Sans Arabic", "Noto Sans Hebrew", var(--font-body); }
html[lang="th"] body { font-family: "Noto Sans Thai", var(--font-body); }
html[lang="hi"] body { font-family: "Noto Sans Devanagari", var(--font-body); }
