/* Same token set as the Playful theme used across the app family
   (see Workout Timer / My Closet css/style.css), with the accent fixed
   to the Light theme's blue instead of the Playful default pink — this
   page isn't user-themeable, it just borrows the family's warm look. */
:root {
  --bg: #f5eedc;
  --surface: #fffcf4;
  --surface-2: #efe6d0;
  --border: #e3d7b8;
  --text: #241c1c;
  --text-dim: #8a7f6d;
  --accent: #3e7bd9;
  --accent-text: #ffffff;
  --font-heading: ui-serif, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 22px;
  --gap: 14px;
  --card-tint: color-mix(in srgb, var(--accent) 10%, var(--surface));
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; font-family: var(--font-heading); }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- HERO ---------- */
.hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  max-width: 14ch;
}
.hero-sub {
  margin-top: 20px;
  max-width: 48ch;
  font-size: 1.1rem;
  color: var(--text-dim);
}
.hero-note {
  margin-top: 28px;
  max-width: 54ch;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.98rem;
  color: var(--text-dim);
}
.hero-note strong { color: var(--text); }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.chip {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 20px;
}

/* ---------- CATALOG SECTION ---------- */
.catalog { padding: 56px 0 20px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 1.6rem; }
.section-head .count { font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }

.pwa-note {
  padding: 18px 20px;
  margin-bottom: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.pwa-note h3 { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 8px; }
.pwa-note p { font-size: 0.95rem; color: var(--text-dim); }
.pwa-note strong { color: var(--text); }

.catalog-group { margin-bottom: 48px; }
.catalog-group:last-child { margin-bottom: 0; }
.catalog-group-head { margin-bottom: 20px; max-width: 62ch; }
.catalog-group-head h3 { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 6px; }
.catalog-group-head p { font-size: 0.92rem; color: var(--text-dim); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 56px;
}
.catalog-group:last-child .card-grid { padding-bottom: 0; }

.app-card {
  position: relative;
  background: var(--card-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 16%, transparent);
}
.app-card:active { transform: scale(0.98); }

.app-card-main {
  width: 100%;
  padding: 22px 20px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.card-open-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.card-open-btn:hover { background: color-mix(in srgb, black 10%, var(--accent)); }
.card-open-btn:active { transform: scale(0.9); }

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }

.app-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.app-card p.tagline { font-size: 0.92rem; color: var(--text-dim); flex-grow: 1; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 9px;
  border-radius: 20px;
}

.card-cta {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.app-card:hover .card-cta { text-decoration: underline; }

/* ---------- MAKE IT YOURS ---------- */
.yours { padding: 8px 0 64px; }
.yours-lead { max-width: 60ch; font-size: 1.05rem; color: var(--text-dim); margin-bottom: 30px; }

.yours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.yours-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.yours-item h4 { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 10px; }
.yours-item p { font-size: 0.92rem; color: var(--text-dim); }

/* ---------- PRINCIPLES ---------- */
.principles {
  background: var(--accent);
  color: var(--accent-text);
  padding: 64px 0;
}
.principles .section-head h2 { color: var(--accent-text); }
.principles .section-head .count { color: rgba(255,255,255,0.75); }

.principles-lead {
  max-width: 60ch;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 40px;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.principle {
  background: color-mix(in srgb, white 12%, var(--accent));
  border-radius: var(--radius);
  padding: 24px 22px;
}
.principle h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--accent-text);
}
.principle p { font-size: 0.9rem; color: rgba(255,255,255,0.82); }

.responsibility-note {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px dashed rgba(255,255,255,0.35);
  max-width: 62ch;
}
.responsibility-note .label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffe1a8;
  display: block;
  margin-bottom: 10px;
}
.responsibility-note p { font-size: 0.98rem; color: rgba(255,255,255,0.92); }

/* ---------- ABOUT ---------- */
.about { padding: 8px 0 56px; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 30px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  max-width: 68ch;
  margin: 0 auto;
}
.about-avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 2px solid var(--accent);
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.about-card p { font-size: 0.96rem; color: var(--text-dim); margin-bottom: 14px; }
.about-card p:last-child { margin-bottom: 0; }
.about-card a { color: var(--accent); font-weight: 600; text-decoration: underline; }

@media (max-width: 560px) {
  .about-card { flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- FOOTER ---------- */
footer { padding: 40px 0 60px; text-align: center; }
footer p { font-size: 0.85rem; color: var(--text-dim); }
footer a { text-decoration: underline; }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 28, 28, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 100;
}
.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--surface);
  max-width: 600px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 28px;
  position: relative;
  padding: 32px 30px;
  margin-top: 20px;
  animation: modal-up 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-up {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:active { transform: scale(0.9); }

.modal-header { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; padding-right: 40px; }
.modal-header .app-icon { margin-bottom: 0; flex-shrink: 0; width: 56px; height: 56px; }
.modal-card h3 { font-size: 1.55rem; }
.modal-tagline { color: var(--text-dim); font-size: 0.98rem; margin-top: 4px; }

.modal-card p.desc { font-size: 0.98rem; margin: 22px 0; color: var(--text); }

.modal-features h5 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.modal-features ul { list-style: none; margin: 0 0 24px; padding: 0; }
.modal-features li {
  font-size: 0.92rem;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  gap: 10px;
}
.modal-features li::before { content: "—"; color: var(--accent); flex-shrink: 0; }

.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }

.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: color-mix(in srgb, black 10%, var(--accent)); }
.btn-secondary:hover { background: var(--surface-2); }

.license-note { margin-top: 12px; font-size: 0.82rem; color: var(--text-dim); }

.closed-note {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-dim);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 14px;
}
.closed-note-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.closed-note p { font-size: 0.92rem; color: var(--text); }
