/* Inés Macías · Geologist & GIS — "Coming soon" page
   Tokens from 04_Colour_Palette/InesMacias_tokens.css (Brand Book v1.0) */

@font-face { font-family: 'Alata'; src: url('../fonts/Alata-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Birthstone'; src: url('../fonts/Birthstone-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Didact Gothic'; src: url('../fonts/DidactGothic-Regular.woff2') format('woff2'); font-display: swap; }

:root {
  --im-limestone: #F4F5EF;  /* base 60% */
  --im-sandstone: #DBDCBE;  /* support 10% */
  --im-lichen: #83907A;     /* brand 25% */
  --im-basalt: #111113;     /* text 5% */
  --im-basalt-62: #676867;  /* secondary text, 5.1:1 on limestone */
  --im-font-heading: 'Alata', 'Helvetica Neue', Arial, sans-serif;
  --im-font-accent: 'Birthstone', cursive;
  --im-font-body: 'Didact Gothic', 'Century Gothic', Avenir, sans-serif;

  --pad: clamp(1.25rem, 5vw, 6rem);
  --rule: color-mix(in srgb, var(--im-basalt) 14%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--im-limestone);
  color: var(--im-basalt);
  font-family: var(--im-font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Background contour map ---------- */
.contours {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .75;
}
.contours svg {
  width: 100%;
  height: 100%;
  transform: translate(var(--px, 0), var(--py, 0)) scale(1.06);
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.contours path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 3.6s cubic-bezier(.45, .05, .3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Fade the map out behind the copy so text always sits on limestone */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--im-limestone) 0%, color-mix(in srgb, var(--im-limestone) 85%, transparent) 38%, transparent 70%);
}

.topbar, .hero, .foot { position: relative; z-index: 1; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 var(--pad);
  padding: clamp(1.25rem, 3vw, 2.25rem) 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.brand img { display: block; width: clamp(170px, 18vw, 230px); height: auto; }

.status, .eyebrow, .lang, .layers-meta, .state, .scale-txt, .readout, .label, .north {
  font-family: var(--im-font-body);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
}
.status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--im-basalt-62);
}
.pulse {
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--im-lichen);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--im-lichen) 60%, transparent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 .7rem transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.lang { display: flex; align-items: center; gap: .35rem; color: var(--im-basalt-62); }
.lang button {
  font: inherit; letter-spacing: inherit;
  background: none; border: 0; padding: .35rem .25rem; cursor: pointer;
  color: var(--im-basalt-62);
  border-bottom: 1px solid transparent;
}
.lang button[aria-pressed="true"] { color: var(--im-basalt); border-bottom-color: var(--im-lichen); }
.lang button:hover { color: var(--im-basalt); }
.lang button:focus-visible { outline: 2px solid var(--im-lichen); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 7vh, 6rem) var(--pad);
}

.eyebrow { margin: 0 0 1.4rem; color: var(--im-basalt-62); }

h1 {
  margin: 0;
  font-family: var(--im-font-heading);
  font-weight: 400;
  font-size: clamp(2.9rem, 1.6rem + 5.4vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}
h1 > span:first-child { display: block; }
.accent {
  font-family: var(--im-font-accent);
  font-style: normal;
  font-weight: 400;
  color: var(--im-lichen);
  font-size: 1.32em;
  line-height: .8;
  letter-spacing: 0;
  padding-right: .04em;
  display: inline-block;
  /* rises like an outcrop emerging */
  animation: surface 1.6s cubic-bezier(.2, .8, .2, 1) .5s both;
}
.dot { color: var(--im-basalt); }
@keyframes surface {
  from { opacity: 0; transform: translateY(.35em); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(-20% -10% -20% -10%); }
}

.lead {
  max-width: 34rem;
  margin: 1.8rem 0 2.4rem;
  color: var(--im-basalt);
}

/* ---------- GIS layers panel ---------- */
.layers {
  max-width: 26rem;
  background: color-mix(in srgb, var(--im-limestone) 88%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 18px 40px -28px rgba(17, 17, 19, .45);
}
.layers header {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--im-sandstone) 45%, transparent);
}
.layers h2 { margin: 0; font-family: var(--im-font-heading); font-weight: 400; font-size: 1rem; }
.layers-meta { margin-left: auto; color: var(--im-basalt-62); font-size: .65rem; }
.layers ul { list-style: none; margin: 0; padding: .4rem 0; }
.layers li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .45rem 1rem;
  font-size: .95rem;
  color: var(--im-basalt-62);
}
.layers li.done, .layers li.busy { color: var(--im-basalt); }
.box {
  width: .95rem; height: .95rem;
  border: 1.5px solid var(--im-lichen);
  border-radius: 2px;
  position: relative;
}
.done .box { background: var(--im-lichen); }
.done .box::after {
  content: ""; position: absolute; left: .26rem; top: .06rem;
  width: .25rem; height: .5rem;
  border: solid var(--im-limestone); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.busy .box { overflow: hidden; }
.busy .box::after {
  content: ""; position: absolute; inset: 0;
  background: var(--im-lichen);
  transform-origin: bottom;
  animation: fill 2.4s ease-in-out infinite;
}
@keyframes fill { 0% { transform: scaleY(0); } 60%, 100% { transform: scaleY(1); opacity: 0; } }
.state { font-size: .62rem; color: var(--im-basalt-62); }
.done .state { color: var(--im-lichen); }
.busy .state { color: var(--im-basalt); }

/* ---------- Map decorations ---------- */
.map { position: relative; height: min(62vh, 560px); }
.marker { position: absolute; left: 52%; top: 46%; }
.pin {
  position: absolute; left: -7px; top: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--im-basalt);
  border: 3px solid var(--im-limestone);
  box-shadow: 0 0 0 1px var(--im-basalt);
}
.ring {
  position: absolute; left: -40px; top: -40px;
  width: 80px; height: 80px; border-radius: 50%;
  border: 1px solid var(--im-lichen);
  animation: ripple 3.2s ease-out infinite;
}
.ring.r2 { animation-delay: 1.6s; }
@keyframes ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.label {
  position: absolute; left: 16px; top: -26px;
  white-space: nowrap; color: var(--im-basalt);
  background: var(--im-limestone); padding: .1rem .45rem;
  border: 1px solid var(--rule);
}

.scale { position: absolute; right: 0; bottom: 0; display: grid; gap: .35rem; justify-items: end; }
.scale .bar { display: flex; border: 1px solid var(--im-basalt); }
.scale .bar i { width: 34px; height: 6px; }
.scale .bar i:nth-child(odd) { background: var(--im-basalt); }
.scale .bar i:nth-child(even) { background: var(--im-limestone); }
.scale-txt { color: var(--im-basalt-62); font-size: .62rem; }

.north {
  position: absolute; right: 0; top: 0;
  display: grid; justify-items: center;
  font-family: var(--im-font-heading); font-size: .9rem; color: var(--im-basalt);
}
.north span { font-size: 1.4rem; line-height: 1; }

/* ---------- Footer with strata ---------- */
.foot { margin-top: auto; }
.strata {
  height: clamp(54px, 9vh, 96px);
  background: url('../assets/strata-bands.svg') center top / 100% 100% no-repeat;
  opacity: .95;
}
.foot-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--pad) 1.2rem;
  background: var(--im-basalt);
  color: var(--im-limestone);
  font-size: .85rem;
}
.foot-row p { margin: 0; }
.tagline { font-family: var(--im-font-heading); letter-spacing: .02em; }
.readout { color: var(--im-sandstone); font-variant-numeric: tabular-nums; }
.copyright { color: var(--im-sandstone); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .map { display: none; }
  body::before {
    background: linear-gradient(180deg, color-mix(in srgb, var(--im-limestone) 92%, transparent) 0%, color-mix(in srgb, var(--im-limestone) 70%, transparent) 100%);
  }
  .readout { display: none; }
}
@media (max-width: 600px) {
  .status { display: none; }
  .foot-row { flex-direction: column; align-items: flex-start; gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .contours path { stroke-dashoffset: 0; }
}
