/* ============================================================
   antidot.gr — side-project page
   Same paper / ink / type as the CV site; each page overrides
   --accent (cyan for Wind Router, orange for Wind Rose).
   Shared by wind-router/ and wind-rose/.
   ============================================================ */

:root {
  --paper: #f4f0e8;
  --paper-deep: #ece7db;
  --ink: #17150f;
  --ink-soft: rgba(23, 21, 15, 0.62);
  --ink-faint: rgba(23, 21, 15, 0.18);
  --accent: #e60000; /* overridden per page */
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Archivo", Helvetica, Arial, sans-serif;
  --mono: "Space Mono", "Courier New", monospace;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 44rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--paper); }
a { color: inherit; }

.mono {
  font-family: var(--mono);
  font-size: 0.72em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
em { font-family: var(--serif); font-style: italic; font-size: 1.06em; }

/* ---------------------------------------------------------- intro curtain */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}
.curtain.is-gone { transform: translateY(-100%); }
.curtain-word {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: clamp(2.4rem, 9vw, 7rem);
  overflow: hidden;
  display: flex;
  max-width: 100%;
  /* pad so the italic terminal of the final letter isn't sliced by the mask */
  padding: 0 0.08em;
}
.curtain-line, .curtain-dot {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.curtain-dot { color: var(--accent); font-style: normal; }
.curtain.is-revealed .curtain-line { transition-delay: 0.15s; transform: translateY(0); }
.curtain.is-revealed .curtain-dot { transition-delay: 0.2s; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .curtain, .curtain-line, .curtain-dot { transition: none; }
}

/* ---------------------------------------------------------- header (matches CV site) */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-faint);
}
.wordmark {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .dot { color: var(--accent); }
.header-left { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 1.6rem); }
/* contextual "you are here" tag next to the wordmark — same as Astarte */
.here-tag {
  font-family: var(--mono); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink); white-space: nowrap; text-decoration: none;
  padding-left: 0.9rem; margin-left: 0.85rem; border-left: 1px solid var(--ink-faint);
  align-self: center;
  transition: color 0.25s;
}
.here-tag .lead { color: var(--accent); }
.here-tag:hover { color: var(--ink-soft); }

/* ---- nav toggle: an arrow pointing top-right (not the antidot burger) ---- */
.nav-toggle {
  padding: 0; border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  transition: color 0.25s;
}
.nav-toggle:hover { color: var(--accent); }
.nav-arrow {
  width: 24px; height: 24px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
/* when the menu is open the arrow rotates to point down-left = "collapse" */
.nav-toggle.is-open .nav-arrow { transform: rotate(135deg); }

/* ---- menu overlay ---- */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(1.1rem, 3.2vh, 2rem);
  padding: clamp(4.5rem, 12vh, 7rem) var(--gutter) var(--gutter);
  background: color-mix(in srgb, var(--paper-deep) 95%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.menu-panel.is-open { opacity: 1; visibility: visible; }
/* name link — SAME big size as the project links (all four items uniform) */
.menu-home {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.35rem, 8vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-decoration: none;
  color: var(--ink);
  width: max-content;
  transition: color 0.25s;
}
.menu-home:hover { color: var(--accent); }
.menu-home .dot { color: var(--accent); }
/* Accent + pulse so it's clearly the side-projects menu, not the antidot one. */
.menu-eyebrow {
  color: var(--accent);
  animation: eyebrow-pulse 1.8s ease-in-out infinite;
}
@keyframes eyebrow-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-eyebrow { animation: none; opacity: 1; }
}
.menu-nav { display: flex; flex-direction: column; gap: clamp(0.4rem, 1.5vh, 1rem); }
.menu-link {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.35rem, 8vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-decoration: none;
  color: var(--ink);
  width: max-content;
  transition: color 0.25s;
}
.menu-link:hover { color: var(--accent); }
.menu-note {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  color: var(--ink-soft);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
}
body.menu-lock { overflow: hidden; }

/* ---------------------------------------------------------- layout */
.wrap {
  min-height: 100dvh;
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(5.5rem, 15vh, 9rem) var(--gutter) clamp(3rem, 8vh, 6rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vh, 2.6rem);
}

.eyebrow { color: var(--accent); }

.title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.8rem, 10vw, 6rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.title .accent-dot { color: var(--accent); }

.lede {
  max-width: var(--measure);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
}
.lede em { color: inherit; }

/* ---------------------------------------------------------- feature points */
.points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  max-width: var(--measure);
}
.points li {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.points li::before { content: "→"; color: var(--accent); }

/* ---------------------------------------------------------- requirement note */
.req {
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.req::before { content: "⌁ "; color: var(--accent); }

/* ---------------------------------------------------------- status pill */
.status {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.status::before {
  content: "";
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  animation: status-dot 0.8s ease-in-out infinite;
}
@keyframes status-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .status::before { animation: none; }
}

/* ---------------------------------------------------------- CTA */
.cta {
  align-self: flex-start;
  margin-top: 0.4rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--paper);
  background: var(--accent);
  padding: 0.85em 1.6em;
  border-radius: 999px;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px -12px var(--accent);
}
.cta:hover { transform: translateY(-2px); filter: brightness(1.08); }
.cta:active { transform: translateY(0); }

/* ---------------------------------------------------------- phone showcase */
/* Full-bleed: break out of the centred column to span the whole viewport. */
.shots {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  row-gap: clamp(1.5rem, 4vw, 3rem);
}

/* Wrapper handles the soft scroll-in; .phone holds the resting tilt + hover.
   Keeping them on separate elements lets the hover transition run freely
   (a running keyframe on the same element would otherwise lock transform).
   Negative horizontal margins let the phones partially overlap. */
.phone-wrap {
  --rot: 0deg;   /* resting tilt, set per phone inline */
  --d: 0s;       /* stagger delay, set per phone inline */
  position: relative;
  z-index: 1;
  margin: 0 clamp(-1.7rem, -1.4vw, -0.7rem);
  opacity: 0;
  transition-property: opacity, z-index;
  transition-duration: 0.7s, 0s;
  transition-timing-function: ease, linear;
  /* z-index only resets 0.9s after leaving hover, so the phone stays in front while it shrinks back */
  transition-delay: var(--d), 0.9s;
  /* gentle continuous float (transform lives here so .phone keeps hover free) */
  animation: floaty 6s ease-in-out infinite;
}
.phone-wrap.is-in { opacity: 1; }
/* on hover: freeze the float so it settles static (z-index handled below, at a
   higher specificity than the nth-child stacking so hover actually wins) */
.phone-wrap:hover {
  animation-play-state: paused;
  transition-delay: 0s, 0s;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
/* reversed stacking so the FIRST phone sits on top; plus desynced float timing */
.phone-wrap:nth-child(1) { z-index: 7; }
.phone-wrap:nth-child(2) { z-index: 6; animation-duration: 7s;   animation-delay: -1.5s; }
.phone-wrap:nth-child(3) { z-index: 5; animation-duration: 5.5s; animation-delay: -3s; }
.phone-wrap:nth-child(4) { z-index: 4; animation-duration: 6.5s; animation-delay: -0.8s; }
.phone-wrap:nth-child(5) { z-index: 3; animation-duration: 7.5s; animation-delay: -2.2s; }
.phone-wrap:nth-child(6) { z-index: 2; animation-duration: 5.8s; animation-delay: -4s; }
.phone-wrap:nth-child(7) { z-index: 1; animation-duration: 6.8s; animation-delay: -1s; }
/* higher specificity than the nth-child rules above so the hovered phone truly
   jumps to the front; it returns to its own z after the delay set on .phone-wrap */
.shots .phone-wrap:hover { z-index: 30; }

/* Pure-CSS Android phone outline. Screenshot drops in as <img class="phone-screen">. */
.phone {
  --phone-w: clamp(164px, 40vw, 226px);
  width: var(--phone-w);
  aspect-ratio: 9 / 19.5;
  background: #0d0d0f;
  border-radius: clamp(1.6rem, 6vw, 2.2rem);
  padding: 0.5rem;
  position: relative;
  transform: rotate(var(--rot));
  /* slow, smooth both ways — grows on hover, eases back on leave */
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.9s ease;
  /* light rim + soft outer glow so overlapping dark screens stay separated */
  box-shadow: 0 18px 44px -20px rgba(23, 21, 15, 0.5),
              0 0 0 1.5px rgba(255, 255, 255, 0.16),
              0 0 26px rgba(255, 255, 255, 0.07);
  will-change: transform;
}
/* hover: straighten, grow noticeably larger, and settle to a static lifted position */
.phone-wrap:hover .phone {
  transform: rotate(0deg) translateY(-16px) scale(1.3);
  box-shadow: 0 46px 84px -22px rgba(23, 21, 15, 0.65),
              0 0 0 1.5px rgba(255, 255, 255, 0.32),
              0 0 46px rgba(255, 255, 255, 0.16);
}
.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: clamp(1.2rem, 5vw, 1.75rem);
  background: var(--paper-deep); /* shows through until an image is dropped in */
  display: block;
}
/* top centered camera punch-hole */
.phone::before {
  content: "";
  position: absolute;
  top: calc(0.5rem + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .phone-wrap { opacity: 1; transform: none; transition: none; animation: none; }
  .phone, .phone-wrap:hover .phone { transition: none; }
}

/* ---------------------------------------------------------- contact */
.contact {
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-label { color: var(--ink-soft); text-transform: none; letter-spacing: 0.01em; }
.contact .email {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-decoration: none;
  width: max-content;
  max-width: 100%;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s;
}
.contact .email:hover { border-color: var(--accent); }

/* ---------------------------------------------------------- footer */
.foot {
  margin-top: auto;
  padding-top: clamp(2rem, 6vh, 3.5rem);
  color: var(--ink-soft);
}
.foot .mono { color: var(--ink-soft); }
