/* ============================================================
   Jotty — landing page
   A neutral paper shell; each card carries its own app's accent.
   ============================================================ */

:root {
  /* Shell */
  --paper:      #f7f4ed;
  --paper-deep: #efe9dd;
  --surface:    #fffdf9;
  --ink:        #1b1a17;
  --ink-soft:   #494540;
  --ink-mute:   #837c72;
  --line:       #e0d8c8;
  --line-soft:  #ebe4d6;

  /* App accents — pulled from each app's own design system */
  --litmus:        #e8553d;
  --litmus-deep:   #b83c27;
  --litmus-tint:   #fdeee9;
  --scribe:        #3d8fd4;
  --scribe-deep:   #1f6bb0;
  --scribe-tint:   #e9f3fc;
  --chalk:         #3f7f55;
  --chalk-deep:    #2c6640;
  --chalk-tint:    #e6f2e9;
  --peerloop:      #7b5ea7;
  --peerloop-deep: #574185;
  --peerloop-tint: #f0eaf8;

  --shadow-sm: 0 1px 2px rgba(27, 26, 23, 0.05);
  --shadow-md: 0 6px 22px rgba(27, 26, 23, 0.07);
  --shadow-lg: 0 18px 48px rgba(27, 26, 23, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #17161a;
    --paper-deep: #121114;
    --surface:    #201e23;
    --ink:        #f3efe7;
    --ink-soft:   #c4bdb2;
    --ink-mute:   #918a80;
    --line:       #35323a;
    --line-soft:  #2a272e;

    --litmus:        #ff7358;
    --litmus-deep:   #ff9077;
    --litmus-tint:   #3a221d;
    --scribe:        #63aeee;
    --scribe-deep:   #8cc5f5;
    --scribe-tint:   #16283a;
    --chalk:         #79b189;
    --chalk-deep:    #99c9a6;
    --chalk-tint:    #1a2a1f;
    --peerloop:      #a98cd6;
    --peerloop-deep: #c0a9e6;
    --peerloop-tint: #26203a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 22px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
}

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(58vw 58vw at 88% -12%, rgba(232, 85, 61, 0.07), transparent 62%),
    radial-gradient(52vw 52vw at -12% 108%, rgba(123, 94, 167, 0.07), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 10;
}
.skip:focus { left: 0; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) clamp(1.25rem, 5vw, 2.5rem) 4rem;
}

/* ---------- Masthead ---------- */

.masthead { max-width: 40rem; }

.wordmark {
  display: flex;
  align-items: center;
}

.wordmark-text {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.tagline {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--ink-soft);
}

/* ---------- Section label ---------- */

.section-label {
  margin: clamp(3.5rem, 8vw, 5.5rem) 0 1.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Cards ---------- */

.grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.card-wrap { display: flex; }

.card {
  --accent: var(--ink);
  --accent-deep: var(--ink);
  --accent-tint: var(--paper-deep);

  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: clamp(1.6rem, 3vw, 2.1rem);
  padding-left: clamp(1.9rem, 3.2vw, 2.4rem);
  overflow: hidden;

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;

  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card[data-app="litmus"]   { --accent: var(--litmus);   --accent-deep: var(--litmus-deep);   --accent-tint: var(--litmus-tint); }
.card[data-app="scribe"]   { --accent: var(--scribe);   --accent-deep: var(--scribe-deep);   --accent-tint: var(--scribe-tint); }
.card[data-app="chalk"]    { --accent: var(--chalk);    --accent-deep: var(--chalk-deep);    --accent-tint: var(--chalk-tint); }
.card[data-app="peerloop"] { --accent: var(--peerloop); --accent-deep: var(--peerloop-deep); --accent-tint: var(--peerloop-tint); }

.card-rule {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--accent);
  transition: width 0.22s ease;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-tint);
  margin-bottom: 1.1rem;
}
.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent-deep);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.card-name-sub {
  font-weight: 400;
  font-style: italic;
  color: var(--ink-mute);
}

.card-line {
  margin-top: 0.45rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-deep);
}

.card-body {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink-mute);
}

.card-link {
  margin-top: auto;
  padding-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent-deep);
}
.arrow { transition: transform 0.22s ease; }

/* Hover / focus */
.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.card:hover .card-rule,
.card:focus-visible .card-rule { width: 8px; }
.card:hover .arrow,
.card:focus-visible .arrow { transform: translateX(4px); }

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Footer ---------- */

.foot {
  margin-top: clamp(3.5rem, 8vw, 5.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-mute);
}
.foot-mute {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-mute);
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover, .card:focus-visible { transform: none; }
}
