/* Tay Boy Interactive — one page */

:root {
  --bg: #0c0b0a;
  --bg-2: #121110;
  --ink: #e9e5dc;
  --ink-2: #a39e93;
  --ink-3: #6b675f;
  --line: rgba(233, 229, 220, 0.12);
  --line-2: rgba(233, 229, 220, 0.22);
  --accent: #e0a63c;
  --rec: #d84a3a;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Film grain over the whole page: a tiled noise texture that jumps position 12 times a second,
   so it reads as film rather than a static overlay. Cheap: no canvas, one fixed layer. */
body::before {
  content: "";
  position: fixed;
  inset: -160px;
  pointer-events: none;
  z-index: 50;
  opacity: 0.085;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  mix-blend-mode: screen;
  animation: grain-step 0.65s steps(1) infinite;
}
@keyframes grain-step {
  0%     { transform: translate(0, 0); }
  12.5%  { transform: translate(-37px, 61px); }
  25%    { transform: translate(84px, -22px); }
  37.5%  { transform: translate(-108px, -73px); }
  50%    { transform: translate(51px, 96px); }
  62.5%  { transform: translate(-64px, 18px); }
  75%    { transform: translate(119px, 44px); }
  87.5%  { transform: translate(-19px, -111px); }
}

/* A little light spill behind the print, so the black has depth around it */
.print::before {
  content: "";
  position: absolute;
  inset: -22% -28% -30%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side at 50% 45%, rgba(224, 190, 130, 0.075), transparent 72%);
}

/* One exposure at load: the page opens a touch bright and settles, like a shutter */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  background: #fff1dc;
  opacity: 0;
  animation: shutter-open 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s both;
}

::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; text-decoration: none; }

/* ---------- small type ---------- */

.label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
}
.label--muted { color: var(--ink-3); }

/* ---------- hero ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.9fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
  align-content: center;
  padding: clamp(40px, 8vh, 96px) var(--gutter) clamp(48px, 10vh, 120px);
  min-height: 100svh;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3vw, 40px);
  padding-bottom: 4px;
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 540;
  font-size: clamp(64px, 12vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  color: var(--ink);
}

.title__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.22em; /* room for descenders inside the clip */
  margin-bottom: -0.22em;
}
.title__inner {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1.3s var(--ease-out) forwards;
}
.title__line:nth-child(1) .title__inner { animation-delay: 0.15s; }
.title__line:nth-child(2) .title__inner { animation-delay: 0.28s; }

.title__line--em .title__inner {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  color: var(--ink-2);
  padding-right: 0.06em; /* italic overhang */
}

/* Each letter of "Tay Boy" softens under the cursor */
.title .ch {
  display: inline-block;
  transition: font-variation-settings 0.9s var(--ease-out), color 0.9s var(--ease-out);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0, "wght" 540;
}
.title .ch:hover {
  transition-duration: 0.25s;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1, "wght" 640;
}
.title .ch--space { width: 0.22em; }

.lede {
  margin: 0;
  max-width: 50ch;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.45;
  font-weight: 300;
  color: var(--ink-2);
  animation: fade-up 1.4s var(--ease-out) 0.7s both;
}

/* ---------- the print ---------- */

.print {
  margin: 0;
  position: relative;
  justify-self: end;
  width: min(100%, 460px);
  animation: fade-up 1.6s var(--ease-out) 0.35s both;
}

.print__frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 500 / 411;
  box-shadow:
    0 0 0 1px var(--line),
    0 40px 80px -30px rgba(0, 0, 0, 0.8);
}

.print__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.12) saturate(1.02) contrast(1.03);
  /* gate weave: the print drifts a hair, irregularly, like film through a projector */
  animation: weave 7s ease-in-out infinite;
  will-change: transform;
}

.print__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.42;
}

.print__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 100% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(to bottom, rgba(255, 245, 220, 0.04), transparent 30%);
}

.print__caption {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- coming soon ---------- */

.soon {
  padding: 0 var(--gutter) clamp(40px, 8vh, 96px);
}

.soon__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app {
  display: grid;
  grid-template-columns: 48px 56px minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: default;
  color: inherit;
}
a.app { cursor: pointer; }
a.app:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

.app__url {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.4s;
}
.app__url::after {
  content: "";
  position: absolute;
  left: 0;
  right: 14px;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
a.app:hover .app__url::after { transform: scaleX(1); }
a.app:hover .app__url { color: var(--ink); }

/* hairline that draws in from the left on hover */
.app::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease-out);
}
.app:hover::after { transform: scaleX(1); }

.app__num { color: var(--ink-3); transition: color 0.5s; }
.app:hover .app__num { color: var(--ink); }

.app__glyph {
  display: block;
  width: 40px;
  height: 40px;
  color: var(--ink);
}
.app__glyph svg { display: block; overflow: visible; }

.app__name {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72, "SOFT" 20;
  transition: font-variation-settings 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.app:hover .app__name {
  font-variation-settings: "opsz" 72, "SOFT" 100;
  transform: translateX(6px);
}

.app__desc {
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 300;
  max-width: 40ch;
  transition: color 0.5s;
}
.app:hover .app__desc { color: var(--ink); }

.app__meta {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-self: end;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(224, 166, 60, 0.5);
  animation: breathe 3.2s ease-in-out infinite;
}
.app[data-app="daisy"] .status i { animation-delay: -1.6s; }

.tc {
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  transition: color 0.4s;
}
.app.is-live .tc { color: var(--rec); }

/* Cheddar: a lens whose iris opens, and a shutter flash */
.cam__body {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.cam__lens {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.cam__iris {
  fill: currentColor;
  transition: r 0.7s var(--ease-out);
}
.cam__flash {
  fill: #fff;
  opacity: 0;
}
.app[data-app="cheddar"]:hover .cam__iris { r: 6.5; }
.app[data-app="cheddar"].is-live .cam__flash { animation: shutter 0.5s ease-out 1; }

/* Daisy: REC */
.rec__ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.rec__dot {
  fill: currentColor;
  transition: fill 0.4s;
}
.app[data-app="daisy"].is-live .rec__dot {
  fill: var(--rec);
  animation: blink 1s steps(1) infinite;
}

/* ---------- footer ---------- */

.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px var(--gutter) 26px;
}
.foot > :last-child { justify-self: end; }

.mail {
  position: relative;
  color: var(--ink-2);
  transition: color 0.4s;
}
.mail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.mail:hover { color: var(--ink); }
.mail:hover::after { transform: scaleX(1); }

/* ---------- keyframes ---------- */

@keyframes rise {
  to { transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes weave {
  0%   { transform: translate(0, 0) scale(1.012); }
  13%  { transform: translate(0.5px, -0.3px) scale(1.012); }
  29%  { transform: translate(-0.4px, 0.5px) scale(1.012); }
  41%  { transform: translate(0.2px, 0.7px) scale(1.012); }
  57%  { transform: translate(-0.6px, -0.2px) scale(1.012); }
  72%  { transform: translate(0.4px, 0.3px) scale(1.012); }
  88%  { transform: translate(-0.2px, -0.6px) scale(1.012); }
  100% { transform: translate(0, 0) scale(1.012); }
}
@keyframes shutter-open {
  0%   { opacity: 0.32; }
  100% { opacity: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes shutter {
  0% { opacity: 0; }
  10% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    gap: 40px;
    padding-top: 28px;
    align-content: start;
  }
  .print {
    justify-self: start;
    width: min(100%, 420px);
    order: -1;
  }
  .title { font-size: clamp(60px, 15.5vw, 120px); }

  .app {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas:
      "num  name  meta"
      "glyph desc desc";
    row-gap: 10px;
    column-gap: 16px;
    padding: 22px 0;
  }
  .app__num   { grid-area: num; align-self: center; }
  .app__glyph { grid-area: glyph; width: 28px; height: 28px; }
  .app__glyph svg { width: 28px; height: 28px; }
  .app__name  { grid-area: name; min-width: 0; }
  .app__desc  { grid-area: desc; max-width: none; min-width: 0; }
  .app__meta  { grid-area: meta; gap: 16px; }
  .app:hover .app__name { transform: none; }
}

@media (max-width: 520px) {
  .top__meta span:first-child { display: none; }
  .top__meta .sep { display: none; }
  .app__meta .label--muted { display: none; }
  .app__meta .status { font-size: 10.5px; }
  .foot { grid-template-columns: 1fr; gap: 8px; }
  .foot > :last-child { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .title__inner { transform: none; }
  body::before { animation: none; }
  body::after { display: none; }
  .print__img { animation: none; transform: none; }
}
