/*
  Smond Design Kit -- design tokens (web).

  Single source of truth for the "paper & ink" beige system used across
  Smond Studio's app icons, marketing sites, and permission/onboarding guide
  screens. See ../README.md for when to use this system vs. plain Apple HIG
  native UI.

  For native apps (SwiftUI) where CSS isn't available, use
  ../tokens/SmondTokens.swift, which mirrors these exact values.
*/

:root {
  /* Paper */
  --smond-bg: #f2ead6;       /* page background */
  --smond-surface: #fbf7ea;  /* card / badge fill */
  --smond-surface-alt: #eae0c6;

  /* Ink */
  --smond-ink: #1e1b16;        /* primary text, glyph strokes/fills, badge border */
  --smond-ink-soft: #5b5347;   /* secondary text */
  --smond-ink-faint: #8c8271;  /* tertiary text, placeholders */

  /* Structure */
  --smond-border: rgba(30, 27, 22, 0.14);
  --smond-border-strong: rgba(30, 27, 22, 0.26);
  --smond-shadow: rgba(30, 27, 22, 0.16);

  --smond-radius-lg: 28px;
  --smond-radius-md: 18px;
  --smond-radius-sm: 12px;

  /* Type */
  --smond-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --smond-font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --smond-font-mono: ui-monospace, "SF Mono", "Menlo", monospace;
}

/*
  Icon badge geometry (see ../icons/badge-template.svg), as ratios of a
  44-unit viewBox so they scale to any icon size:

    outer square    : inset 2 / 44   (~4.5% margin on each side)
    outer radius     : 11 / 44        (25% of the square -- a soft squircle,
                                        noticeably rounder than iOS/macOS's
                                        own ~22% app-icon corner)
    border stroke    : 1.6 / 44       (~3.6% of the square)
    glyph ink         : --smond-ink solid for emphasis; --smond-ink at
                                        ~0.16 fill-opacity / ~0.5 stroke-opacity
                                        for de-emphasis (never a second hue --
                                        contrast IS the accent in this system)
*/
/*
  Smond Design Kit -- shared web stylesheet.

  Structural/component CSS for Smond marketing sites (landing pages, support,
  privacy/legal pages). Always beige/paper-and-ink -- unlike native apps, web
  properties don't switch to a platform-native mode. Load ../tokens/tokens.css
  first (or @import it, as below), then this file, then any page-specific CSS.

  Extracted from the Single Screen site (singlescreen.app) -- built generic
  from day one, so this is close to a straight lift. Class names are
  unprefixed (.nav, .hero, .feature, ...) since this is meant to be the only
  sitewide stylesheet for a given project, not one library among several.
*/


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--smond-font-display);
  font-optical-sizing: auto;
  text-wrap: balance;
}

.wrap {
  max-width: var(--smond-max-width, 1080px);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(20px);
  -webkit-backdrop-filter: saturate(140%) blur(20px);
  background: rgba(242, 234, 214, 0.78);
  border-bottom: 1px solid var(--smond-border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--smond-font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--smond-ink);
}

.brand .mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--smond-ink-soft);
}

.nav-links a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--smond-ink);
}

.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--smond-ink);
  color: var(--smond-surface) !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

/* Hero */

.hero {
  padding: 96px 0 64px;
  text-align: center;
}

.hero .mark-ring {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 10px 16px var(--smond-shadow));
}

.mark-ring .draw {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: draw-badge 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes draw-badge {
  to {
    stroke-dashoffset: 0;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--smond-ink-soft);
  background: var(--smond-surface-alt);
  border: 1px solid var(--smond-border);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(38px, 5.8vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  font-weight: 600;
}

.hero p.lede {
  max-width: 560px;
  margin: 0 auto 34px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--smond-ink-soft);
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
  filter: drop-shadow(0 6px 14px var(--smond-shadow));
}

.app-store-badge img {
  display: block;
  height: 44px;
  width: auto;
}

.app-store-badge:hover {
  transform: translateY(-1px);
  opacity: 0.85;
}

.app-store-badge-fallback {
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--smond-ink);
  color: var(--smond-surface);
  font-weight: 600;
  font-size: 15px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--smond-border-strong);
  color: var(--smond-ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--smond-surface-alt);
  border-color: var(--smond-ink-faint);
}

.requirement {
  margin-top: 18px;
  font-size: 13px;
  color: var(--smond-ink-faint);
  font-variant-numeric: tabular-nums;
}

/* Hero / product screenshot chrome */

.hero-shot {
  margin: 56px auto 0;
  max-width: 880px;
}

/* macOS window chrome, in paper form -- screenshot placeholders are literal
   window frames, rendered as a soft card rather than a glassy dark pane. Use
   this wherever a product screenshot needs to read as "a window on your
   Mac" without breaking the beige mood. */

.mac-window {
  border-radius: var(--smond-radius-lg);
  overflow: hidden;
  border: 1px solid var(--smond-border);
  background: var(--smond-surface);
  box-shadow: 0 24px 48px -20px var(--smond-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mac-window:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 56px -18px var(--smond-shadow);
}

.mac-window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--smond-border);
  background: var(--smond-surface-alt);
}

.mac-window-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mac-window-bar .dot.red { background: #ff5f57; }
.mac-window-bar .dot.yellow { background: #febc2e; }
.mac-window-bar .dot.green { background: #28c840; }

/* Centered on the full bar width, independent of the traffic-light cluster's
   real width -- matches how macOS itself centers window titles. */
.mac-window-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 55%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--smond-font-mono);
  font-size: 12px;
  color: var(--smond-ink-faint);
  pointer-events: none;
}

.mac-window-body {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--smond-surface);
}

.mac-window-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 24px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      var(--smond-border) 27px,
      var(--smond-border) 28px
    );
}

.screenshot-fallback strong {
  font-size: 13px;
  color: var(--smond-ink-soft);
  font-weight: 700;
}

.screenshot-fallback span {
  font-size: 12px;
  color: var(--smond-ink-faint);
  max-width: 320px;
}

/* Sections */

section {
  padding: 72px 0;
}

.section-head {
  max-width: 560px;
  margin: 0 0 44px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  font-weight: 600;
}

.section-head p {
  color: var(--smond-ink-soft);
  font-size: 16px;
  margin: 0;
}

.section-head code {
  font-family: var(--smond-font-mono);
  font-size: 0.9em;
  color: var(--smond-ink-soft);
  background: var(--smond-surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Feature cards */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.feature {
  padding: 26px 24px;
  border-radius: var(--smond-radius-md);
  background: var(--smond-surface);
  border: 1px solid var(--smond-border);
  box-shadow: 0 10px 24px -16px var(--smond-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px var(--smond-shadow);
}

.feature .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--smond-ink);
  margin-bottom: 16px;
}

.feature h3 {
  font-family: var(--smond-font-body);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
  color: var(--smond-ink);
}

.feature p {
  font-size: 14px;
  color: var(--smond-ink-soft);
  margin: 0;
}

/* App list -- studio site: a simple list of the apps in the family, each
   a card with icon, name, a live/crafting status pill, and (if shipped)
   a link out to the app's own site. */

.apps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  border-radius: var(--smond-radius-md);
  background: var(--smond-surface);
  border: 1px solid var(--smond-border);
  box-shadow: 0 10px 24px -16px var(--smond-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px var(--smond-shadow);
}

.app-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px var(--smond-shadow));
}

.app-body {
  flex: 1;
  min-width: 0;
}

.app-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.app-name-row h3 {
  font-family: var(--smond-font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  color: var(--smond-ink);
}

.app-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.app-status.is-live {
  background: var(--smond-ink);
  color: var(--smond-surface);
}

.app-status.is-crafting {
  background: var(--smond-surface-alt);
  color: var(--smond-ink-soft);
  border: 1px solid var(--smond-border);
}

.app-desc {
  margin: 0;
  font-size: 14px;
  color: var(--smond-ink-soft);
}

.app-go {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--smond-ink-faint);
  transition: color 0.15s ease;
}

a.app-card:hover .app-go {
  color: var(--smond-ink);
}

/* Screenshots grid */

.screens-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.screenshot-card {
  margin: 0;
}

.screenshot-card figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--smond-ink-soft);
}

/* Trust / how-it-works panel */

.trust {
  background: var(--smond-surface);
  border: 1px solid var(--smond-border);
  border-radius: var(--smond-radius-lg);
  box-shadow: 0 24px 48px -24px var(--smond-shadow);
  padding: 44px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.trust h2 {
  font-size: 24px;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.trust p {
  color: var(--smond-ink-soft);
  font-size: 15px;
  margin: 0;
}

.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--smond-ink-soft);
}

.trust-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--smond-ink);
  flex-shrink: 0;
}

.trust-list strong {
  color: var(--smond-ink);
}

/* Footer */

footer {
  border-top: 1px solid var(--smond-border);
  padding: 40px 0;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--smond-ink-faint);
}

footer .foot-links {
  display: flex;
  gap: 20px;
}

footer a {
  text-decoration: none;
  color: var(--smond-ink-faint);
}

footer a:hover {
  color: var(--smond-ink-soft);
}

footer .credit a {
  color: var(--smond-ink-soft);
  font-weight: 700;
}

/* Legal / article pages */

.article {
  padding: 72px 0 96px;
}

.article .wrap {
  max-width: 640px;
}

.article h1 {
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  font-weight: 600;
}

.article .updated {
  color: var(--smond-ink-faint);
  font-size: 13px;
  margin: 0 0 40px;
  font-variant-numeric: tabular-nums;
}

.article h2 {
  font-size: 18px;
  margin: 36px 0 10px;
  font-weight: 700;
  color: var(--smond-ink);
}

.article p {
  color: var(--smond-ink-soft);
  font-size: 15px;
  max-width: 65ch;
  margin: 0 0 6px;
}

.article a {
  color: var(--smond-ink);
  text-decoration: underline;
  text-decoration-color: var(--smond-border-strong);
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .trust {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }

  .screens-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    padding: 18px 20px;
    gap: 14px;
  }

  .app-go {
    display: none;
  }
}
