/* Tetrad on the web, in Edge's design language. As on the Mac: one panel (the goo) floating on
   black. The panel is humedgtec.com's paper, with brown Edge Book and brown ink lines through the
   site's ink filter.
   Nothing fades: lines draw on, words are on. The panel changes size on a spring between screens. */
@font-face { font-family: 'Edge Book'; src: url('assets/edge-book.woff2') format('woff2'); font-weight: 400 800; font-display: block; }
/* Clean EB Garamond (OFL, the face Edge Book was made from) for type set large; inked live (#ink-type). */
@font-face { font-family: 'EB Garamond Ink'; src: url('assets/eb-garamond.woff2') format('woff2'); font-weight: 400 800; font-display: block; }

:root {
  --paper: #F6F3EC;
  --ink: #453e3b;
  --goo: #F6F3EC;
  --white: #453e3b;                  /* the ink on the panel (named for where it started) */
  --soft: rgba(69, 62, 59, 0.55);
  --faint: rgba(69, 62, 59, 0.36);
  --night: #000;
  --serif: 'Edge Book', Georgia, serif;
  --body: clamp(17px, 1.35vw, 20px);
  --big: clamp(25px, 2.6vw, 34px);
  --line: 2.2px;
  --spring: cubic-bezier(.3, 1.25, .45, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-synthesis: none; background: var(--night); }
body { margin: 0; min-height: 100svh; background: var(--night); color: var(--white);
  font: 500 var(--body) / 1.45 var(--serif); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }


.room { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 40px 16px calc(28px + env(safe-area-inset-bottom)); }

/* The goo. Its width is the screen's (reading or square); its height follows the content. */
.goo { width: min(100%, var(--w, 660px)); background: var(--goo); border-radius: 34px;
  -webkit-backdrop-filter: blur(28px) saturate(1.1); backdrop-filter: blur(28px) saturate(1.1);
  box-shadow: 0 30px 90px rgba(246, 243, 236, 0.06);
  transition: width 0.55s var(--spring), height 0.55s var(--spring); overflow: hidden; }
.goo.wide { --w: 1060px; }
.stage { padding: clamp(28px, 4vw, 52px); }

.page { display: flex; flex-direction: column; gap: 1.1em; }
.label-row { display: flex; justify-content: space-between; gap: 16px; }
.label { color: var(--soft); }
.lead { font-size: var(--big); line-height: 1.2; letter-spacing: -0.005em; }
/* Large type: clean outlines, inked at screen scale, so the bleed is the same size as body type's. */
.lead, .object .name, .corner .written.canonical { font-family: 'EB Garamond Ink', var(--serif); font-weight: 590; filter: url(#ink-type); }
.text p + p { margin-top: 0.9em; }
.note { color: var(--soft); }

/* The object: its name, alone, and the day. */
.object { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.5em; padding: 3.2em 0; }
.object .name { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.05; letter-spacing: -0.01em; }

/* The square: two white ink lines and a circle, drawn on; a corner in each quarter, centred in it,
   so the circle takes the same room from every corner. */
.square { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: calc(100svh - 230px); min-height: 420px; }
.page .square { aspect-ratio: 16 / 9; min-height: 360px; }
.square svg.cross { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.square svg.cross g { filter: url(#ink); }
.cross line, .cross circle { fill: none; stroke: var(--white); stroke-width: var(--line); stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s cubic-bezier(.45, 0, .2, 1) forwards; }
.cross line.v { animation-delay: 0.08s; }
.cross circle { animation-delay: 0.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 8.2em; text-align: center; line-height: 1.15; }
.corner { position: absolute; width: 50%; height: 50%; padding: 1.2em 3em; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 0.4em; }
/* Each row's two labels sit at one height (Maxwell): every corner starts from the top of its
   quarter, at the same distance, and grows downward as you write. */
.corner { justify-content: flex-start; padding-top: 2.4em; }
.corner.enhances, .corner.reverses { top: 0; }
.corner.retrieves, .corner.obsolesces { bottom: 0; }
.corner.enhances, .corner.retrieves { left: 0; }
.corner.reverses, .corner.obsolesces { right: 0; }
.corner textarea, .corner .written { width: 100%; max-width: 21em; resize: none; border: 0; outline: 0; padding: 0; margin: 0;
  background: transparent; color: var(--white); font: inherit; line-height: 1.35; text-align: center; overflow: hidden; }
.corner textarea::placeholder { color: var(--faint); opacity: 1; }
.corner .written { white-space: pre-wrap; }
.corner .written.canonical { font-size: var(--big); line-height: 1.15; }
.corner .written.ask { color: var(--soft); }
.cite { color: var(--soft); font-size: 0.8em; text-align: center; max-width: 46em; margin: 0 auto; }

/* Your tetrads: each finished square as a small card. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card { position: relative; aspect-ratio: 1; border-radius: 18px; background: rgba(69, 62, 59, 0.06); text-align: center;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; padding: 12px; font-size: 12px; line-height: 1.25; color: var(--soft); }
.card span { display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
.card::before, .card::after { content: ''; position: absolute; background: var(--faint); }
.card::before { left: 50%; top: 14px; bottom: 14px; width: 1.5px; }
.card::after { top: 50%; left: 14px; right: 14px; height: 1.5px; }
.card b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; font-weight: 500; font-size: 15px;
  color: var(--white); background: var(--goo); border-radius: 99px; padding: 10px 12px; max-width: 70%; line-height: 1.1; }
.card small { position: absolute; left: 0; right: 0; bottom: -1.7em; font-size: 13px; color: var(--soft); }
.cards a { color: inherit; text-decoration: none; margin-bottom: 1.6em; }

/* Under the goo, on the paper: dots for where you are, and the one action. */
.chrome { display: flex; align-items: center; justify-content: center; gap: 26px; color: var(--paper); min-height: 30px; }
.dots { display: flex; gap: 6px; }
.dots button { width: 22px; height: 22px; display: grid; place-items: center; }
.dots button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.6px solid var(--paper); transition: background 0.2s; }
.dots button.on::before { background: var(--paper); }
.action:empty, .action[hidden] { display: none; }
.soft-action { color: rgba(246, 243, 236, 0.6); border-bottom-color: rgba(246, 243, 236, 0.35); }
.action { border-bottom: 2px solid var(--paper); line-height: 1.15; }

/* A phone: the corners stack under the drawn mark. */
@media (max-width: 720px) {
  .goo { border-radius: 26px; }
  .square, .page .square { aspect-ratio: auto; max-height: none; min-height: 0; display: flex; flex-direction: column; gap: 1.5em; padding-top: 180px; }
  .square svg.cross { height: 160px; inset: 0 0 auto 0; }
  .center { top: 80px; width: 5.2em; font-size: 0.82em; }
  .corner { position: static; width: 100%; height: auto; padding: 0 !important; }
  .corner textarea { min-height: 3em; }
}
