/* ==========================================================================
   Project 08 · Oikos (team: a solar-powered wildfire detector, 2nd place at the
   Provost's Sustainability Challenge). Reuses the site's viewer, panels, KPIs and
   caveats. The award is silver (2nd place); the only colour is the ember of a fire.
   ========================================================================== */

.ok { --ok-ember: #ff7a1a; --ok-silver: linear-gradient(140deg, #ffffff 0%, #d9d9d9 38%, #9c9c9c 62%, #e9e9e9 100%); }

/* ---------- the award banner ---------- */
.ok-award {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 300px); align-items: center; gap: clamp(18px, 3vw, 36px);
  margin: 0 0 28px; padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 140% at 0% 0%, rgba(255, 255, 255, 0.09) 0%, transparent 60%), var(--surface);
}
.ok-award::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.06) 45%, transparent 60%); background-size: 250% 100%; animation: ok-sheen 6s var(--ease) infinite; }
@keyframes ok-sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
html.reduce-motion .ok-award::before { animation: none; }
.ok-medal {
  position: relative; width: clamp(76px, 8vw, 104px); aspect-ratio: 1; display: grid; place-items: center; grid-auto-flow: column; align-content: center; justify-content: center;
  border-radius: 50%; background: var(--ok-silver); color: #111; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.55), inset 0 0 0 9px rgba(0, 0, 0, 0.08), 0 14px 30px -12px rgba(255, 255, 255, 0.25);
}
.ok-medal b { font: 700 clamp(38px, 4.2vw, 52px)/1 var(--font); letter-spacing: -0.06em; }
.ok-medal span { align-self: start; margin: 6px 0 0 1px; font: 700 clamp(13px, 1.3vw, 16px)/1 var(--font); }
.ok-award-k { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--ok-silver); color: #111; font: 600 11.5px/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase; }
.ok-award-txt h4 { margin: 12px 0 8px; font: 600 clamp(22px, 2.6vw, 32px)/1.12 var(--font); letter-spacing: -0.035em; }
.ok-award-txt p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.ok-award-photo { margin: 0; align-self: stretch; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.ok-award-photo img { display: block; width: 100%; height: 100%; min-height: 150px; object-fit: cover; object-position: 50% 62%; }

#ok-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#ok-canvas.hovering { cursor: pointer; }
#ok-canvas:active { cursor: grabbing; }
.ok-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--dim); }

/* ---------- section heads ---------- */
.ok-h { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: baseline; margin: 80px 0 18px; }
.ok-h .ok-n { grid-row: 1; }
.ok-h h4 { margin: 0; font: 600 clamp(24px, 2.6vw, 30px)/1.1 var(--font); letter-spacing: -0.04em; }
.ok-h p { grid-column: 2; margin: 0; font-size: 15px; color: var(--muted); max-width: 680px; }
.ok-n { font: 500 12px/1 var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }

.ok-local { margin-top: 2px; }
.ok-local p { margin: 8px 0 0; max-width: 820px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ---------- how it works: four steps in a row, joined by a line ---------- */
.ok-flow { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ok-flow li { position: relative; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ok-flow li:not(:last-child)::after { content: ""; position: absolute; top: 31px; right: -13px; width: 14px; height: 1px; background: var(--line-3); }
.ok-flow .ok-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-3); border-radius: 999px; color: var(--ink); }
.ok-flow li:first-child .ok-n { border-color: var(--ok-ember); color: var(--ok-ember); }
.ok-flow h5 { margin: 14px 0 6px; font: 600 16px/1.3 var(--font); letter-spacing: -0.015em; }
.ok-flow p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- the prototype: CAD loop + the working hardware ---------- */
.ok-proto { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.ok-video { margin: 0; }
.ok-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #2a2210; }
.ok-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ok-video figcaption { margin: 10px 2px 0; font-size: 13px; color: var(--muted); }
.ok-hw .sub { margin: 8px 0 0; }
.ok-hw .tt-list { margin-top: 12px; }
.ok-hw .tt-list li { font-size: 14.5px; padding-bottom: 7px; }
.ok-hw .tt-list b { color: var(--ink); font-weight: 600; }
.ok-hw .job-link { display: inline-block; margin-top: 6px; }

/* ---------- photos ---------- */
.ok-shots { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.ok-shots figure { margin: 0; }
.ok-shots img { display: block; width: 100%; height: 100%; max-height: 420px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.ok-shots figure:first-child img { aspect-ratio: auto; }
.ok-shots figcaption { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }

/* ---------- team ---------- */
.ok-team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ok-team li { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ok-team li:first-child { border-color: var(--line-3); background: var(--surface-2); }
.ok-team h5 { margin: 10px 0 6px; font: 600 18px/1.2 var(--font); letter-spacing: -0.025em; }
.ok-team p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

@media (max-width: 1020px) {
  .ok-team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ok-award { grid-template-columns: auto minmax(0, 1fr); }
  .ok-award-photo { grid-column: 1 / -1; }
  .ok-award-photo img { height: auto; aspect-ratio: 16 / 9; }
  .ok-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ok-flow li::after { display: none; }
  .ok-proto, .ok-shots { grid-template-columns: minmax(0, 1fr); }
  .ok-shots img, .ok-shots figure:first-child img { height: auto; max-height: none; aspect-ratio: auto; }
}
@media (max-width: 560px) {
  .ok-award { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .ok-medal { width: 72px; }
  .ok-flow, .ok-team { grid-template-columns: minmax(0, 1fr); }
  .ok-team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ok-team li:first-child { grid-column: 1 / -1; }
  .ok-h { margin-top: 64px; }
}

/* ---------- tile (outside the panel): a full-width card, the drawing on the right ---------- */
.tile-oikos { grid-column: 1 / -1; }
.tile-oikos .tile-art { inset: 54px 28px 26px 40%; }
.tile-oikos .tile-info { right: 58%; }
.tile-award {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 auto 0 14px; padding: 6px 12px 6px 9px; border-radius: 999px;
  background: linear-gradient(140deg, #ffffff 0%, #d9d9d9 40%, #a6a6a6 70%, #ececec 100%); color: #0b0b0b;
  font: 600 12px/1 var(--font); letter-spacing: -0.005em; white-space: nowrap; box-shadow: 0 6px 18px -8px rgba(255, 255, 255, 0.35);
}
.tile-award svg { width: 15px; height: 15px; flex: none; }
.ok-tile-art .hill { fill: none; stroke: rgba(255, 255, 255, 0.32); stroke-width: 1.6; }
.ok-tile-art .hill.far { stroke: rgba(255, 255, 255, 0.12); }
.ok-tile-art .unit * { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ok-tile-art .unit rect { fill: #121212; }
.ok-tile-art .unit .roof { fill: rgba(255, 255, 255, 0.92); }
.ok-tile-art .unit .wedge { fill: #1b1b1b; stroke-width: 1.6; }
.ok-tile-art .unit .panel { stroke: #0b0b0b; stroke-width: 2.4; }
.ok-tile-art .unit .eye { fill: rgba(255, 255, 255, 0.9); stroke: none; }
.ok-tile-art .unit .tip { fill: rgba(255, 255, 255, 0.9); stroke: none; }
.ok-tile-art .waves path { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.8; stroke-linecap: round; }
.ok-tile-art .waves path:nth-child(2) { stroke: rgba(255, 255, 255, 0.32); }
.ok-tile-art .waves path:nth-child(3) { stroke: rgba(255, 255, 255, 0.16); }
.ok-tile-art .smoke path { fill: none; stroke: rgba(255, 255, 255, 0.18); stroke-width: 1.6; stroke-dasharray: 2 7; stroke-linecap: round; }
.ok-tile-art .fl { fill: #ff7a1a; }
.ok-tile-art .fl-in { fill: #ffc266; }
@media (max-width: 960px) {
  .tile-oikos .tile-art { inset: 54px 20px 26px 36%; }
  .tile-oikos .tile-info { right: 52%; }
  .tile-award { font-size: 11px; }
}
@media (max-width: 600px) {
  .tile-oikos .tile-art { inset: 70px 20px 118px; }
  .tile-oikos .tile-info { right: 20px; }
  .tile-award { margin-left: 10px; padding: 5px 10px 5px 8px; font-size: 0; gap: 0; }
  .tile-award::after { content: "2nd place"; font-size: 11.5px; margin-left: 6px; }
}

/* About's "Selected work": on desktop it's one of three equal cards, so the drawing sits above the text */
@media (min-width: 961px) {
  .feats .tile-oikos { grid-column: auto; }
  .feats .tile-oikos .tile-art { inset: 70px 22px 126px; }
  .feats .tile-oikos .tile-info { right: 22px; }
}

/* the "Latest" line in the hero */
.hf-award b { font-weight: 600; }
