/* ============================================================
   Illic Isle — nav link + section
   Drop-in for chrisilic.com. Every class is prefixed `ii-`, so
   nothing here can collide with anything already on the site.

   This section does NOT try to look like the rest of the page.
   The page is a gallery at night; this is a games console that
   somebody has wheeled into it and plugged in. The contrast is
   the point — it borrows the page's black and its brass so it
   belongs in the building, and nothing else.

   Load this AFTER styles.css. One rule — keeping the nav link
   visible on phones — relies on coming later in the cascade.
   ============================================================ */

.ii,
.ii-navlink {
  --ii-gold: #ffd24a;
  --ii-gold-d: #a8791a;
  --ii-cyan: #4ad0ff;
  --ii-pink: #ff4a8a;
  --ii-ink: #07070a;
  --ii-panel: #0d0d11;
  --ii-line: rgba(255, 210, 74, .28);
  --ii-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
             "Liberation Mono", monospace;
}

/* ============================================================
   1 — THE NAV LINK
   A brass idol in a row of serif capitals, running slightly out
   of convergence the way a tube does.
   ============================================================ */
.ii-navlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .1rem .45rem;
  color: var(--dim, #9c9384);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .3s var(--ease, cubic-bezier(.16,1,.3,1));
}
.ii-navlink:hover,
.ii-navlink:focus-visible { color: #fff6dd; }

.ii-navlink-idol {
  display: block;
  color: var(--accent, #b8985c);
  animation: ii-bob 3.6s ease-in-out infinite, ii-glint 6.5s ease-in-out infinite;
  transition: color .3s, filter .3s;
}
.ii-navlink-idol svg { display: block; }
.ii-navlink:hover .ii-navlink-idol,
.ii-navlink:focus-visible .ii-navlink-idol {
  color: var(--ii-gold);
  filter: drop-shadow(0 0 5px rgba(255, 210, 74, .8));
}
@keyframes ii-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-1.5px) } }
@keyframes ii-glint {
  0%, 72%, 100% { color: var(--accent, #b8985c); filter: none }
  78%           { color: #fff0c8; filter: drop-shadow(0 0 3px rgba(255,210,74,.7)) }
  86%           { color: var(--accent-soft, #c9ad78); filter: none }
}

/* the label, very slightly out of convergence */
.ii-navlink-text {
  position: relative;
  animation: ii-fringe 5s steps(1, end) infinite;
}
@keyframes ii-fringe {
  0%, 92%, 100% { text-shadow: none }
  94%  { text-shadow: -1px 0 rgba(255,74,138,.75), 1px 0 rgba(74,208,255,.75) }
  96%  { text-shadow: 1px 0 rgba(255,74,138,.6), -1px 0 rgba(74,208,255,.6) }
}
.ii-navlink:hover .ii-navlink-text {
  text-shadow: -1px 0 rgba(255,74,138,.55), 1px 0 rgba(74,208,255,.55);
}

.ii-navlink-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--ii-mono);
  font-size: .54rem; letter-spacing: .2em;
  padding: .2rem .42rem .16rem;
  color: var(--ii-gold);
  border: 1px solid var(--ii-line);
  transition: background .3s, color .3s, border-color .3s;
}
.ii-navlink-tag::before {
  content: ""; width: 3px; height: 3px; background: currentColor; border-radius: 50%;
  animation: ii-pulse 2.2s ease-in-out infinite;
}
@keyframes ii-pulse { 0%,100% { opacity: .25 } 50% { opacity: 1 } }
.ii-navlink:hover .ii-navlink-tag,
.ii-navlink:focus-visible .ii-navlink-tag {
  background: var(--ii-gold); border-color: transparent; color: #140f07;
}

.ii-navlink::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--ii-gold), transparent);
  transition: width .55s var(--ease, cubic-bezier(.16,1,.3,1));
}
.ii-navlink:hover::after, .ii-navlink:focus-visible::after { width: 100%; }

/* Phones hide the other nav links; this one stays, because it is the
   thing being advertised. Needs to come after styles.css to win. */
/* Dropping the PLAY chip buys the row another ~65px, which is what keeps
   the seven-item nav off the brand between 892 and 960. */
@media (max-width: 960px) { .ii-navlink-tag { display: none; } }

/* The site collapses its nav links at 890px, not the 600px this was written
   against — without matching it, this link vanished through that whole band. */
@media (max-width: 890px) {
  .nav-links a.ii-navlink { display: inline-flex; }
}
@media (max-width: 420px) { .ii-navlink { letter-spacing: .1em; gap: .4rem } }

/* ============================================================
   2 — THE PAGE
   One screenful of island, edge to edge and top to bottom, with
   everything else sitting on the glass. Below it, the two modes
   and the site's own footer.
   ============================================================ */
.ii {
  position: relative;
  display: block;
  background: var(--ii-ink);
}
/* the starfield the rest of the site runs behind everything shows
   through under the stage, so the page does not go flat black */
body.illic-page { background: var(--ii-ink) }
/* The nav is transparent until you scroll, which is fine over a dark
   gallery and useless over a midday sky. On this page it always has
   something behind it. */
.illic-page .nav:not(.scrolled) {
  background: linear-gradient(to bottom,
    rgba(5,6,10,.92) 0%, rgba(5,6,10,.6) 58%, rgba(5,6,10,0) 100%);
}
.illic-page .footer { border-top: 1px solid var(--ii-line) }
/* break out of whatever container the site puts this in */
.ii-bleed { width: 100vw; margin-left: calc(50% - 50vw) }

/* ---------- pixel type ----------
   Every heading and label is an SVG of 5x7 pixels, sized by font-size
   and coloured by `color` like any other text. The real words sit
   behind it in a screen-reader span. */
[data-px] { display: block; line-height: 1 }
[data-px] svg {
  display: block; height: 1em; width: auto;   /* JS sets the real height */
  /* it shrinks to fit rather than pushing out of its column —
     preserveAspectRatio keeps it square either way */
  max-width: 100%;
}
.ii-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* the title fills its column instead of being set by font-size */
.ii-title svg { width: 100%; height: auto; max-width: 30rem }

/* ---------- the stage: one whole screen ---------- */
.ii-crt {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #04050a;
  cursor: grab;
  touch-action: pan-y;
  isolation: isolate;
}
.ii-crt:active { cursor: grabbing }
.ii-crt canvas {
  display: block; width: 100%; height: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
  filter: saturate(1.08) contrast(1.06);
}
.ii-crt.ii-full, .ii-crt:fullscreen { height: 100%; width: 100% }

.ii-scan {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.30) 0 1px, rgba(0,0,0,0) 1px 3px),
    repeating-linear-gradient(to right,
      rgba(255,80,80,.05) 0 1px, rgba(80,255,110,.05) 1px 2px, rgba(90,120,255,.05) 2px 3px);
  mix-blend-mode: multiply; opacity: .55;
}
.ii-glass {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(140% 110% at 50% 42%, transparent 46%, rgba(0,0,0,.72) 100%),
    linear-gradient(102deg, rgba(255,255,255,.05) 0 20%, transparent 40%);
}
.ii-glass::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18%;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.04), rgba(255,255,255,0));
  animation: ii-rollbar 8s linear infinite;
}
@keyframes ii-rollbar { from { top: -20% } to { top: 104% } }

/* ---------- the marquee, laid across the top of the glass ---------- */
/* The rail runs along the BOTTOM of the glass. The site's nav is fixed
   and floats over the top of the stage, and a gold strip fighting it for
   the same forty pixels was never going to win. */
.ii-marquee {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 4;
  height: 1.6rem;
  background: var(--ii-gold);
  border-top: 1px solid #000;
  background-repeat: repeat-x;
  background-size: auto 100%;
  image-rendering: pixelated;
  animation: ii-roll 26s linear infinite;
}
@keyframes ii-roll { from { background-position-x: 0 } to { background-position-x: var(--ii-roll, -600px) } }

/* ---------- corner chrome ---------- */
.ii-chrome {
  position: absolute; top: 4.6rem; left: 0; right: 0; z-index: 4;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: clamp(.9rem, 2.5vw, 1.6rem);
  pointer-events: none;
}
.ii-chrome > * { pointer-events: auto }
.ii-clock, .ii-hint {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .58rem; color: rgba(236,230,218,.75);
  background: rgba(6,6,10,.55); padding: .45rem .6rem;
  border: 1px solid rgba(255,210,74,.2);
}
.ii-clock i {
  width: 4px; height: 4px; border-radius: 50%; background: var(--ii-gold);
  animation: ii-pulse 2.4s ease-in-out infinite;
}
.ii-hint { margin-left: auto; margin-right: .5rem; transition: opacity .6s ease }
.ii-hint.ii-used { opacity: 0 }
@media (max-width: 560px) { .ii-hint { display: none } }
.ii-fs {
  display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem; flex: 0 0 auto;
  background: rgba(6,6,10,.55); color: var(--ii-gold);
  border: 1px solid var(--ii-line); cursor: pointer;
  transition: background .25s, color .25s;
}
.ii-fs:hover { background: var(--ii-gold); color: #150f02 }
.ii-fs svg { display: block; width: 14px; height: 14px; fill: currentColor }
.ii-crt.ii-full .ii-fs-open, .ii-crt:not(.ii-full) .ii-fs-close { display: none }

/* ---------- what sits on the glass ---------- */
.ii-over {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(1.3rem, 4vw, 3.4rem);
  padding-bottom: calc(clamp(1.3rem, 4vw, 3.4rem) + 1.6rem);
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(4,5,10,.9) 0%, rgba(4,5,10,.55) 24%, rgba(4,5,10,0) 54%);
}
.ii-over > * { pointer-events: auto }
.ii-kick {
  font-size: .7rem; color: var(--ii-gold); margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px #000);
}
.ii-title {
  color: #fff6dd; margin-bottom: 1.1rem;
  filter:
    drop-shadow(-3px 0 rgba(255,74,138,.55))
    drop-shadow(3px 0 rgba(74,208,255,.5))
    drop-shadow(0 6px 0 rgba(0,0,0,.65));
}
.ii-sub {
  max-width: 38rem; margin-bottom: 1.4rem;
  color: #d5ccba; font-size: clamp(.95rem, 1.6vw, 1.15rem);
  font-style: italic; line-height: 1.6;
  text-shadow: 0 2px 10px #000;
}
@media (max-height: 600px) { .ii-sub { display: none } }

.ii-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem }
.ii-btn {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .74rem;
  padding: .95rem 1.5rem;
  color: #150f02; background: var(--ii-gold);
  border: 0; text-decoration: none;
  box-shadow: 0 4px 0 var(--ii-gold-d), 0 14px 30px -12px rgba(255,210,74,.6);
  transition: transform .09s ease, box-shadow .09s ease, background .25s;
}
.ii-btn [data-px] { display: inline-block }
.ii-btn:hover { background: #ffe08a }
.ii-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ii-gold-d) }
.ii-btn i {
  width: 0; height: 0; border-left: 8px solid currentColor;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.ii-btn-ghost {
  color: var(--ii-gold); background: rgba(8,8,12,.55);
  border: 1px solid var(--ii-line);
  box-shadow: 0 4px 0 rgba(255,210,74,.14);
  backdrop-filter: blur(4px);
}
.ii-btn-ghost:hover { background: rgba(255,210,74,.14); color: #fff0c0 }

/* ---------- below the screen: the two modes ---------- */
.ii-read {
  max-width: 66rem; margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 4rem) 1.3rem clamp(2.5rem, 6vw, 4.5rem);
}
.ii-modes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--ii-line); border: 1px solid var(--ii-line);
}
@media (max-width: 720px) { .ii-modes { grid-template-columns: 1fr } }
.ii-mode { background: var(--ii-panel); padding: 0 0 1.8rem }
.ii-mode-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(255,210,74,.1);
  border-bottom: 1px solid var(--ii-line);
  padding: .7rem clamp(1.1rem, 2.5vw, 1.8rem);
  font-size: .58rem; color: var(--ii-gold);
}
.ii-mode h2, .ii-mode h3 {
  color: #fff6dd; font-size: clamp(.85rem, 1.7vw, 1.05rem);
  font-weight: 400; margin: 0;
  padding: 1.5rem clamp(1.1rem, 2.5vw, 1.8rem) .9rem;
}
.ii-mode p {
  color: var(--dim, #9c9384); font-size: 1rem; line-height: 1.75;
  padding: 0 clamp(1.1rem, 2.5vw, 1.8rem);
}
.ii-note {
  margin-top: 1.6rem; display: flex; justify-content: center;
  font-size: .56rem; color: var(--dimmer, #6c6456);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ii-navlink-idol, .ii-navlink-tag::before, .ii-navlink-text,
  .ii-marquee, .ii-glass::after, .ii-clock i { animation: none }
  .ii-btn:active { transform: none }
}
