/* Vayash Studio — public site
 *
 * Identity is deliberately near-monochrome: warm paper, deep ink, hairlines.
 * The only saturated colour on the page comes from an app's own artwork, so
 * every future app sets its own tone against a neutral frame instead of
 * inheriting FitRealm's navy-and-electric-blue.
 *
 * NOTE: public/ and dashboard/ deploy as two separate Cloudflare Pages
 * projects, so they cannot share a stylesheet. The token block below is
 * duplicated in dashboard/assets/dashboard.css — change both or neither.
 */

:root {
  color-scheme: light;

  --paper:        #f4f2ed;
  --surface:      #fcfbf8;
  --ink:          #14140f;
  --ink-2:        #55534c;
  /* 4.94:1 on --surface. The reference muted ink (#8a877e) measures 3.47:1 and
     fails AA for the body text this carries. Dark keeps #8a877e — 4.9:1 there. */
  --ink-3:        #716f66;
  --hairline:     #e2dfd6;
  --hairline-2:   #d3cfc3;
  --accent:       #1f4e4a;
  --accent-soft:  #e6efed;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.5vw, 1.55rem);
  --step-2:  clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3:  clamp(2.1rem, 1.5rem + 2.9vw, 4.2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:       #0d0d0b;
    --surface:     #191917;
    --ink:         #ffffff;
    --ink-2:       #c4c2b8;
    --ink-3:       #8a877e;
    --hairline:    #2c2c29;
    --hairline-2:  #3d3d39;
    --accent:      #7fc8bc;
    --accent-soft: #16302d;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:       #0d0d0b;
  --surface:     #191917;
  --ink:         #ffffff;
  --ink-2:       #c4c2b8;
  --ink-3:       #8a877e;
  --hairline:    #2c2c29;
  --hairline-2:  #3d3d39;
  --accent:      #7fc8bc;
  --accent-soft: #16302d;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--step-0)/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis-weight: none;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.022em; margin: 0; font-weight: 620; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding-block: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-size: var(--step-1); font-weight: 640; letter-spacing: -0.03em;
  text-decoration: none; display: inline-flex; align-items: baseline; gap: 0.5ch;
}
.wordmark .mark {
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--ink); border-radius: 3px;
  padding: 0.1em 0.32em; font-size: 0.72em; letter-spacing: 0.02em;
}

.nav { display: flex; gap: 1.6rem; font-size: var(--step--1); color: var(--ink-2); }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

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

.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { font-size: var(--step-3); max-width: 18ch; }
.hero p {
  font-size: var(--step-1); color: var(--ink-2);
  max-width: var(--measure); margin: 1.5rem 0 0; text-wrap: pretty;
}

.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ------------------------------------------------------------------- meta */

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-block: 2.75rem 1.5rem;
}
.section-head h2 { font-size: var(--step-2); }
.section-head .count {
  font-size: var(--step--1); color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- apps */

.apps { display: grid; gap: 1px; background: var(--hairline); border-block: 1px solid var(--hairline); }
@media (min-width: 56rem) { .apps { grid-template-columns: 1fr 1fr; } }

.app {
  background: var(--surface);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: flex; flex-direction: column; gap: 1rem;
  min-height: 15rem;
  text-decoration: none;
}
.app[href]:hover { background: var(--accent-soft); }

.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.app h3 { font-size: var(--step-1); }
.app p { margin: 0; color: var(--ink-2); max-width: 42ch; text-wrap: pretty; }

.badge {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 600; white-space: nowrap;
  padding: 0.28em 0.6em; border-radius: 999px;
  border: 1px solid var(--hairline-2); color: var(--ink-2);
}
.badge[data-state="live"]  { border-color: var(--accent); color: var(--accent); }
.badge[data-state="build"] { border-style: dashed; }

.app-foot {
  margin-top: auto; padding-top: 1rem;
  display: flex; gap: 1.25rem; flex-wrap: wrap;
  font-size: var(--step--1); color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.app-foot b { font-weight: 600; color: var(--ink-2); }

.app.placeholder { border: 1px dashed var(--hairline-2); background: transparent; justify-content: center; }
.app.placeholder h3 { color: var(--ink-3); font-weight: 500; }
.app.placeholder p { color: var(--ink-3); }

/* ------------------------------------------------------------------ prose */

.prose { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.prose-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .prose-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.prose h3 { font-size: var(--step-0); margin-bottom: 0.6rem; }
.prose p { margin: 0; color: var(--ink-2); text-wrap: pretty; }

/* ------------------------------------------------------------------- page */

.page { padding-block: clamp(2.5rem, 6vw, 4rem); max-width: var(--measure); }
.page h1 { font-size: var(--step-2); margin-bottom: 1.5rem; }
.page h2 { font-size: var(--step-0); margin: 2.25rem 0 0.5rem; }
.page p, .page li { color: var(--ink-2); }
.page ul { padding-left: 1.1rem; }
.page li { margin-block: 0.3rem; }
.page .lede { color: var(--ink); }

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

.foot {
  border-top: 1px solid var(--hairline);
  padding-block: 2rem 3rem;
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  font-size: var(--step--1); color: var(--ink-3);
}
.foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
