/* Home page only. Tokens live in styles.css. */

/* ---------- Intro ---------- */
.intro { padding: 44px 0 36px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.intro .eyebrow { grid-column: 1 / -1; }
.intro h1 {
  grid-column: 1 / span 10; margin: 0;
  font-weight: 800; font-size: clamp(2.2rem, 4.8vw, 4.2rem); line-height: .98; letter-spacing: -.045em;
}
.intro h1 em { font-style: normal; color: var(--red); }
.intro .lede { grid-column: 1 / span 7; margin: 18px 0 0; font-size: 1.2rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .intro { padding: 36px 0 28px; }
  .intro h1, .intro .lede { grid-column: 1 / -1; }
}

/* ---------- Section frame: label column + content ---------- */
.sec { display: grid; grid-template-columns: 220px 1fr; column-gap: 24px; border-top: 1.5px solid var(--rule); padding-top: 14px; margin-top: 72px; scroll-margin-top: 16px; }
.sec > h2 { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.sec > h2 small { display: block; margin-top: 4px; font-family: var(--mono); font-size: .72rem; font-weight: 400; color: var(--ink-3); }
@media (max-width: 760px) { .sec { grid-template-columns: 1fr; row-gap: 18px; margin-top: 56px; } }

/* ---------- Projects: Metro-style tiles ----------
   Each tile is dressed as its own app. Square grid; Penny Falls takes a 2x2,
   the rest are 2x1. Sizes inside a tile use container units so they scale. */
.tiles-wrap { container-type: inline-size; }
/* Projects runs full width: label above, tiles across the whole page */
#projects { grid-template-columns: 1fr; row-gap: 18px; }
#projects > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
#projects > h2 small { margin: 0; }
.tiles {
  --gap: 12px;
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: calc((100cqi - 3 * var(--gap)) / 4 * .8);
}
.t { position: relative; grid-column: span 2; min-width: 0; container-type: size; }
/* Privacy sits on top of the tile link, bottom-right. Required by the App Store; keep it. */
.t .priv {
  position: absolute; right: 5.5cqw; bottom: 8cqh; z-index: 2;
  font-size: max(11px, 2.4cqw); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.t .priv:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.t-penny { grid-row: span 2; }
.t > a:not(.priv) {
  position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.t > a:not(.priv):hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .55); }
.t > a:not(.priv):active { transform: scale(.985); }
.t .foot::after { content: " →"; opacity: 0; transition: opacity .18s; }
.t > a:not(.priv):hover .foot::after { opacity: 1; }
.t > a:not(.priv):focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
@container (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: calc((100cqi - var(--gap)) / 2 * 1.08); }
}

/* Penny Falls: pier arcade at night */
.t-penny > a:not(.priv) {
  align-items: center; color: #DBE0F2;
  background: radial-gradient(90% 70% at 50% 32%, #1C2E54 0%, #0A1229 62%, #050A1A 100%);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
}
.t-penny .awning {
  align-self: stretch; flex: none; height: 7cqh;
  background: repeating-linear-gradient(90deg, #D6292B 0 8cqw, #FAEDCC 8cqw 16cqw);
  -webkit-mask: radial-gradient(4cqw 2.4cqh at 4cqw 100%, transparent 98%, #000) 0 0 / 8cqw 100% repeat-x;
          mask: radial-gradient(4cqw 2.4cqh at 4cqw 100%, transparent 98%, #000) 0 0 / 8cqw 100% repeat-x;
}
.t-penny .priv { bottom: 7cqh; color: #EBBD61; letter-spacing: .12em; text-transform: uppercase; font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif; font-weight: 700; }
.t-penny .bulbs { align-self: stretch; display: flex; justify-content: space-between; padding: 2.6cqh 5cqw 0; }
.t-penny .bulbs i { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #FFD978; box-shadow: 0 0 2cqw .3cqw rgba(255, 217, 120, .55); animation: bulb 2.4s steps(1) infinite; }
.t-penny .bulbs i:nth-child(3n+1) { animation-delay: -.8s; }
.t-penny .bulbs i:nth-child(3n+2) { animation-delay: -1.6s; }
@keyframes bulb { 0%, 66% { opacity: 1; } 67%, 100% { opacity: .35; } }
.t-penny .mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 8cqw; }
.t-penny .icon { width: 20cqw; height: 20cqw; border-radius: 22%; box-shadow: 0 3cqw 6cqw -2cqw rgba(0, 0, 0, .8); }
.t-penny .script {
  margin-top: 3cqh; font: 400 12cqw/1.1 Pacifico, cursive; color: #FFE3E3;
  text-shadow: 0 0 4px #fff, 0 0 12px #FF3B3B, 0 0 28px #FF3B3B, 0 0 48px #D10000;
}
.t-penny .tube { margin-top: 5cqh; font: 400 4.6cqw/1 Monoton, cursive; letter-spacing: .2em; color: #FFDB80; text-shadow: 0 0 10px rgba(255, 184, 64, .8); }
.t-penny .say { margin-top: 4cqh; font-size: max(13px, 3.4cqw); line-height: 1.45; color: #FAEDCC; max-width: 30em; }
.t-penny .foot {
  align-self: stretch; display: flex; justify-content: flex-start; gap: 12px; padding: 0 5.5cqw 7cqh;
  font-size: max(11px, 2.5cqw); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #EBBD61;
}

/* Unimpressed: the yellow band, a serif verdict, mono for the record */
.t-unimp > a:not(.priv) {
  justify-content: space-between; padding: 9cqh 5.5cqw 8cqh;
  background: #F2C200; color: #151718;
  font: 700 max(10.5px, 2.5cqw)/1.3 "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; text-transform: uppercase;
}
.t-unimp .head, .t-unimp .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.t-unimp .lockup { display: inline-flex; align-items: baseline; gap: .6em; letter-spacing: .18em; }
.t-unimp .lockup svg { width: 1.3em; height: .73em; fill: currentColor; }
.t-unimp .roasts { position: relative; flex: 1; margin: 4cqh 0; }
.t-unimp .roasts span {
  position: absolute; inset: 0; display: flex; align-items: center;
  font: 900 max(19px, 6.2cqw)/1.08 "Source Serif 4", Georgia, serif; letter-spacing: -.015em; text-transform: none;
  opacity: 0; animation: roast 12s ease-in-out infinite;
}
.t-unimp .roasts span:nth-child(2) { animation-delay: 4s; }
.t-unimp .roasts span:nth-child(3) { animation-delay: 8s; }
@keyframes roast {
  0%       { opacity: 0; transform: translateY(18%); }
  4%, 27%  { opacity: 1; transform: none; }
  31%, 100% { opacity: 0; transform: translateY(-18%); }
}
.t-unimp .priv { color: #151718; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; bottom: 8cqh; }
.t-unimp .head b { background: #151718; color: #FF5A47; padding: .45em .7em .4em; letter-spacing: .16em; }

/* arcDefence: UV night, hazard dashes, day-glo */
.t-arc > a:not(.priv) {
  flex-direction: row; align-items: stretch; gap: 5cqw; padding: 9cqh 5.5cqw 6cqh;
  background: radial-gradient(100% 90% at 20% 10%, #2A0B5E 0%, #12043A 55%, #07021A 100%);
  color: #B9A3F0; font: 400 max(12px, 2.9cqw)/1.4 system-ui, -apple-system, sans-serif;
}
.t-arc .hazard { position: absolute; inset: 0 0 auto; height: 4px; background: repeating-linear-gradient(90deg, #FFE600 0 14px, transparent 14px 22px); opacity: .9; }
.t-arc .icon { align-self: center; width: 40cqh; height: 40cqh; flex: none; filter: drop-shadow(0 0 16px rgba(255, 45, 149, .5)); }
.t-arc .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t-arc .tag { font-family: Audiowide, "Arial Black", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.t-arc .foot { margin-top: auto; padding-top: 3cqh; font-size: max(9.5px, 2.1cqw); color: #B9A3F0; }
.t-arc .priv { color: #00E5FF; bottom: 6cqh; }
.t-arc .word { font: 400 max(24px, 7.4cqw)/1 Audiowide, "Arial Black", sans-serif; color: #F6EFFF; }
.t-arc .word span { color: #FF2D95; text-shadow: 0 0 6px rgba(255, 45, 149, .8), 0 0 22px rgba(255, 45, 149, .5); }
.t-arc .sub { margin-top: 1.2cqh; color: #00E5FF; }
.t-arc .daily { margin-top: 4cqh; color: #F6EFFF; }
.t-arc .daily .tag { color: #FFE600; margin-right: .5em; }
.t-arc .pips { display: flex; gap: 5px; margin-top: 3cqh; }
.t-arc .pips i { flex: 1; height: 7px; border-radius: 2px; background: #00E5FF; box-shadow: 0 0 8px rgba(0, 229, 255, .55); animation: hum 2.6s ease-in-out infinite; }
.t-arc .pips i:nth-child(odd) { animation-delay: -1.3s; }
.t-arc .pips i.off { background: #3A1670; box-shadow: none; animation: none; }
@keyframes hum { 50% { opacity: .6; } }

/* ReviseTogether: clean white, the green underline, a 10-minute timer */
.t-revise > a:not(.priv) {
  justify-content: space-between; padding: 8cqh 5.5cqw 8cqh;
  background: radial-gradient(60% 90% at 100% 100%, #FBE9DD 0%, transparent 70%), radial-gradient(50% 70% at 85% 0%, #E3F1E6 0%, transparent 70%), #FFFFFF;
  color: #1B2430; border: 1px solid #E3E1DA;
}
.t-revise .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.t-revise .brand { font-weight: 800; letter-spacing: -.02em; font-size: max(14px, 3.4cqw); }
.t-revise .priv { color: #1B2430; }
.t-revise .big { max-width: 66%; font-weight: 800; font-size: max(22px, 7cqw); line-height: 1.02; letter-spacing: -.035em; }
.t-revise .big em { font-style: normal; color: #1E6B3F; background: linear-gradient(#CFE3D4, #CFE3D4) 0 92% / 100% .14em no-repeat; }
.t-revise .foot { font-size: max(12px, 2.8cqw); font-weight: 600; color: #4B5563; }
.t-revise .timer { position: absolute; right: 5.5cqw; top: 34cqh; width: 32cqh; height: 32cqh; }
.t-revise .timer circle { fill: none; stroke: #E3F1E6; stroke-width: 5; }
.t-revise .timer .sweep { stroke: #1E6B3F; stroke-linecap: round; stroke-dasharray: 100; transform: rotate(-90deg); transform-origin: 32px 32px; animation: sweep 10s linear infinite; }
.t-revise .timer text { font: 700 11.5px "Inter Tight", system-ui, sans-serif; fill: #1B2430; text-anchor: middle; }
@keyframes sweep { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

/* ThingGetter: navy console, the chase as a live feed */
.t-thing > a:not(.priv) {
  flex-direction: row; gap: 5cqw; padding: 8cqh 5.5cqw;
  background: #0F172A; color: #CBD5E1;
}
.t-thing .lead { flex: 1.1; min-width: 0; display: flex; flex-direction: column; }
.t-thing .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; font-size: max(13px, 3cqw); }
.t-thing .tg { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 6px; background: #fff; color: #0F172A; font-size: .78em; font-weight: 800; }
.t-thing .big { margin-top: auto; font-weight: 800; font-size: max(22px, 6.4cqw); line-height: 1; letter-spacing: -.035em; color: #fff; }
.t-thing .sub { margin-top: 2.5cqh; font-size: max(12px, 2.8cqw); line-height: 1.35; }
.t-thing .foot { margin-top: auto; padding-top: 3cqh; font-size: max(12px, 2.8cqw); font-weight: 600; color: #94A3B8; }
.t-thing .priv { color: #E2E8F0; }
.t-thing .feed {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3.4cqh;
  margin-bottom: 15cqh; background: #1E293B; border: 1px solid #334155; border-radius: 10px; padding: 0 4cqw; font-size: max(11px, 2.6cqw); white-space: nowrap;
}
.t-thing .lights { display: flex; gap: 5px; }
.t-thing .lights i { width: 8px; height: 8px; border-radius: 50%; background: #EF4444; }
.t-thing .lights i:nth-child(2) { background: #EAB308; }
.t-thing .lights i:nth-child(3) { background: #22C55E; }
.t-thing .ev { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; animation: step 8s ease-in-out infinite; }
.t-thing .ev i { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #64748B; }
.t-thing .ev.blue  { color: #60A5FA; animation-delay: 2s; }
.t-thing .ev.red   { color: #F87171; animation-delay: 4s; }
.t-thing .ev.green { color: #4ADE80; animation-delay: 6s; }
.t-thing .ev.blue i  { border-color: #60A5FA; }
.t-thing .ev.red i   { background: #EF4444; border-color: #EF4444; }
.t-thing .ev.green i { background: #22C55E; border-color: #22C55E; }
@keyframes step { 0%, 100% { opacity: .45; } 6%, 24% { opacity: 1; } 30% { opacity: .45; } }
@container (max-width: 420px) {
  .t-thing .feed { display: none; }
  .t .kind { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .t > a:not(.priv) { transition: none; }
  .t-penny .bulbs i, .t-arc .pips i, .t-thing .ev, .t-revise .timer .sweep { animation: none; }
  .t-revise .timer .sweep { stroke-dashoffset: 0; }
  .t-unimp .roasts span { animation: none; }
  .t-unimp .roasts span:first-child { opacity: 1; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
.about .text p { margin: 0 0 16px; font-size: 1.1rem; color: var(--ink-2); }
.about .text p:first-child { font-size: clamp(1.5rem, 2.8vw, 1.9rem); font-weight: 600; line-height: 1.22; letter-spacing: -.025em; color: var(--ink); }
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.rules li { display: grid; grid-template-columns: 44px 1fr; gap: 0 12px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.rules .n { grid-row: span 2; font-family: var(--mono); font-size: .78rem; color: var(--red); padding-top: 3px; }
.rules b { font-weight: 600; }
.rules span { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Contact ---------- */
.contact p { margin: 0 0 10px; color: var(--ink-2); }
.contact a.big {
  display: inline-block; font-weight: 800; font-size: clamp(2rem, 6.6vw, 5rem); line-height: 1; letter-spacing: -.05em;
  text-decoration: none; border-bottom: 3px solid var(--red); padding-bottom: 6px; word-break: break-word;
}
.contact a.big:hover { color: var(--red); }

.intro + .sec { margin-top: 0; }
