/* Winter Atlas — snowcity.icu · Ultra-Minimal */
@property --num {
  syntax: "<integer>";
  initial-value: 0;
  inherits: false;
}

:root {
  --white: #ffffff;
  --ice: #e0f4ff;
  --black: #0a0a0a;
  --muted: rgba(10, 10, 10, 0.45);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── Snow crystal pattern ── */
.crystals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.crystal {
  position: absolute;
  background: var(--ice);
  opacity: 0.55;
  clip-path: polygon(50% 0%, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0% 50%, 38% 35%);
}

.crystal:nth-child(1)  { width: 48px; height: 48px; top: 12%; left: 8%;  animation: drift 18s ease-in-out infinite; }
.crystal:nth-child(2)  { width: 32px; height: 32px; top: 28%; right: 12%; animation: drift 22s ease-in-out infinite reverse; opacity: 0.35; }
.crystal:nth-child(3)  { width: 64px; height: 64px; bottom: 18%; left: 15%; animation: drift 25s ease-in-out infinite 2s; opacity: 0.25; }
.crystal:nth-child(4)  { width: 24px; height: 24px; top: 55%; right: 22%; animation: drift 16s ease-in-out infinite 1s; }
.crystal:nth-child(5)  { width: 40px; height: 40px; bottom: 30%; right: 8%;  animation: drift 20s ease-in-out infinite 3s; opacity: 0.4; }
.crystal:nth-child(6)  { width: 20px; height: 20px; top: 72%; left: 42%; animation: drift 14s ease-in-out infinite; opacity: 0.3; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%       { transform: translate(12px, -18px) rotate(15deg); }
  66%       { transform: translate(-8px, 10px) rotate(-10deg); }
}

/* ── Hover nav ── */
.nav-hover {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(224, 244, 255, 0.8);
}

body:hover .nav-hover,
.nav-hover:hover,
.nav-hover:focus-within {
  transform: translateY(0);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 100;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.25s;
}

.nav-links a:hover,
.nav-links a.active { opacity: 1; }

/* ── Dot navigation (pure CSS via view timelines) ── */
.dot-nav {
  position: fixed;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dot-nav a {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(10, 10, 10, 0.2);
  background: transparent;
  transition: border-color 0.3s;
}

.dot-nav a:hover { border-color: var(--black); }

/* ── Sections ── */
.panel {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4rem 2rem;
  text-align: center;
}

.panel-inner {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.panel-wide { max-width: 820px; }

.panel--ice { background: var(--ice); }
.panel--white { background: var(--white); }

.panel-label {
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.panel h1,
.panel h2 {
  font-weight: 100;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.panel h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  margin-bottom: 1.5rem;
}

.panel h2 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  margin-bottom: 1.25rem;
}

.panel-lead {
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.panel-body {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.75;
}

.panel-body + .panel-body { margin-top: 1.25rem; }

/* ── Float-in reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  animation: float-in linear forwards;
  animation-timeline: view();
  animation-range: entry 5% entry 45%;
}

.reveal-delay {
  animation-range: entry 10% entry 50%;
}

@keyframes float-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Animated counters ── */
.stat-row {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 8vw, 6rem);
  flex-wrap: wrap;
  margin-top: 3.5rem;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-weight: 100;
  font-size: clamp(3.5rem, 10vw, 7rem);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  --num: 0;
}

.stat-value::before {
  content: counter(num);
  counter-reset: num var(--num);
}

.stat-value--40  { animation: count-40 2.8s var(--ease) forwards; animation-timeline: view(); animation-range: entry 10% entry 60%; }
.stat-value--5   { animation: count-5 2.8s var(--ease) forwards; animation-timeline: view(); animation-range: entry 10% entry 60%; }
.stat-value--365 { animation: count-365 3s var(--ease) forwards; animation-timeline: view(); animation-range: entry 10% entry 60%; }

@keyframes count-40  { to { --num: 40; } }
@keyframes count-5   { to { --num: 5; } }
@keyframes count-365 { to { --num: 365; } }

.stat-suffix {
  font-weight: 100;
  font-size: clamp(2rem, 6vw, 4rem);
  vertical-align: super;
}

.stat-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-temp::after {
  content: "°C";
  font-weight: 200;
  font-size: 0.55em;
  vertical-align: super;
  margin-left: 0.05em;
}

.stat-temp::before { content: "−"; }

/* ── CTA link ── */
.link-quiet {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--black);
  padding-bottom: 0.25rem;
  transition: opacity 0.25s;
}

.link-quiet:hover { opacity: 0.5; }

/* ── Footer panel ── */
.panel-footer {
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand {
  font-weight: 100;
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.45;
  transition: opacity 0.25s;
}

.footer-links a:hover { opacity: 1; }

.footer-copy {
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ── Legal pages ── */
.legal-scroll {
  min-height: 100vh;
  padding: 6rem 2rem 5rem;
}

.legal-wrap {
  max-width: 620px;
  margin: 0 auto;
}

.legal-wrap h1 {
  font-weight: 100;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
}

.legal-wrap h2 {
  font-weight: 200;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

.legal-wrap p,
.legal-wrap li {
  font-size: 0.9875rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  line-height: 1.75;
}

.legal-wrap ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-wrap a {
  border-bottom: 1px solid rgba(10, 10, 10, 0.15);
  transition: opacity 0.2s;
}

.legal-wrap a:hover { opacity: 0.55; }

.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.45;
  transition: opacity 0.25s;
}

.back-link:hover { opacity: 1; }

/* ── Cookie banner ── */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--black);
  color: var(--white);
  padding: 1.1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  font-weight: 300;
  transform: translateY(0);
  transition: transform 0.5s var(--ease);
}

.cookie-bar.hidden { transform: translateY(110%); }

.cookie-bar a { border-bottom: 1px solid rgba(255,255,255,0.35); }

.cookie-btns { display: flex; gap: 0.65rem; flex-shrink: 0; }

.cookie-btns button {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 1.25rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-accept { background: var(--white); color: var(--black); }
.btn-decline { background: transparent; color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.2) !important; }
.cookie-btns button:hover { opacity: 0.75; }

/* ── View-timeline dot activation ── */
#s-hero    { view-timeline-name: --s-hero; }
#s-stats    { view-timeline-name: --s-stats; }
#s-intro    { view-timeline-name: --s-intro; }
#s-snow     { view-timeline-name: --s-snow; }
#s-sled     { view-timeline-name: --s-sled; }
#s-ice      { view-timeline-name: --s-ice; }
#s-sea      { view-timeline-name: --s-sea; }
#s-gulf     { view-timeline-name: --s-gulf; }
#s-india    { view-timeline-name: --s-india; }
#s-pacific  { view-timeline-name: --s-pacific; }
#s-wear     { view-timeline-name: --s-wear; }
#s-family   { view-timeline-name: --s-family; }
#s-timing   { view-timeline-name: --s-timing; }
#s-footer   { view-timeline-name: --s-footer; }

.dot-nav a[href="#s-hero"]    { animation: dot-active linear; animation-timeline: --s-hero;    animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-stats"]   { animation: dot-active linear; animation-timeline: --s-stats;   animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-intro"]   { animation: dot-active linear; animation-timeline: --s-intro;   animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-snow"]    { animation: dot-active linear; animation-timeline: --s-snow;    animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-sled"]    { animation: dot-active linear; animation-timeline: --s-sled;    animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-ice"]     { animation: dot-active linear; animation-timeline: --s-ice;     animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-sea"]     { animation: dot-active linear; animation-timeline: --s-sea;     animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-gulf"]    { animation: dot-active linear; animation-timeline: --s-gulf;    animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-india"]   { animation: dot-active linear; animation-timeline: --s-india;   animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-pacific"] { animation: dot-active linear; animation-timeline: --s-pacific; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-wear"]    { animation: dot-active linear; animation-timeline: --s-wear;    animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-family"]  { animation: dot-active linear; animation-timeline: --s-family;  animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-timing"]  { animation: dot-active linear; animation-timeline: --s-timing;  animation-range: cover 40% cover 60%; }
.dot-nav a[href="#s-footer"]  { animation: dot-active linear; animation-timeline: --s-footer;  animation-range: cover 40% cover 60%; }

@keyframes dot-active {
  0%, 100% { background: transparent; transform: scale(1); border-color: rgba(10,10,10,0.2); }
  50%      { background: var(--black); transform: scale(1.35); border-color: var(--black); }
}

/* Sub-page dot timelines */
#p-1 { view-timeline-name: --p-1; }
#p-2 { view-timeline-name: --p-2; }
#p-3 { view-timeline-name: --p-3; }
#p-4 { view-timeline-name: --p-4; }
#p-5 { view-timeline-name: --p-5; }
#p-6 { view-timeline-name: --p-6; }
#p-7 { view-timeline-name: --p-7; }
#p-8 { view-timeline-name: --p-8; }

.dot-nav a[href="#p-1"] { animation: dot-active linear; animation-timeline: --p-1; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#p-2"] { animation: dot-active linear; animation-timeline: --p-2; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#p-3"] { animation: dot-active linear; animation-timeline: --p-3; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#p-4"] { animation: dot-active linear; animation-timeline: --p-4; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#p-5"] { animation: dot-active linear; animation-timeline: --p-5; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#p-6"] { animation: dot-active linear; animation-timeline: --p-6; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#p-7"] { animation: dot-active linear; animation-timeline: --p-7; animation-range: cover 40% cover 60%; }
.dot-nav a[href="#p-8"] { animation: dot-active linear; animation-timeline: --p-8; animation-range: cover 40% cover 60%; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .dot-nav { right: 0.85rem; gap: 0.6rem; }
  .dot-nav a { width: 6px; height: 6px; }
  .nav-links { gap: 1.25rem; }
  .nav-inner { padding: 1rem 1.25rem; }
  .panel { padding: 3rem 1.5rem; }
  .stat-row { gap: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .stat-value, .dot-nav a, .crystal { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .stat-value--40  { --num: 40; }
  .stat-value--5   { --num: 5; }
  .stat-value--365 { --num: 365; }
}
