/* Rewault site styles. No external resources. */

:root {
  color-scheme: light dark;
  /* Palette taken from the app icon (#5665a0 periwinkle) */
  --bg: #fbfbfe;
  --bg-alt: #f2f3fa;
  --card: #ffffff;
  --text: #1b1e33;
  --text-2: #5f6380;
  --border: rgba(40, 48, 100, 0.1);
  --accent: #4a57a8;
  --accent-soft: rgba(86, 101, 160, 0.12);
  --mark-bg: #fff3c4;
  --mark-text: #6b4e00;
  --hero-bg: linear-gradient(180deg, #e9ebf8 0%, #f4f5fc 60%, var(--bg) 100%);
  --hero-glow: rgba(110, 124, 200, 0.35);
  --hero-text: #1b1e33;
  --hero-text-2: #4d5272;
  --icon-shadow: 0 18px 40px -8px rgba(58, 68, 130, 0.45), 0 2px 6px rgba(58, 68, 130, 0.2);
  --card-shadow: 0 1px 2px rgba(30, 36, 80, 0.04), 0 8px 24px -12px rgba(30, 36, 80, 0.12);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d18;
    --bg-alt: #141729;
    --card: #161a2e;
    --text: #eef0fa;
    --text-2: #a3a8c4;
    --border: rgba(170, 180, 240, 0.12);
    --accent: #a4aef0;
    --accent-soft: rgba(140, 152, 230, 0.16);
    --hero-bg: linear-gradient(180deg, #1c2246 0%, #121530 60%, var(--bg) 100%);
    --hero-glow: rgba(110, 124, 220, 0.45);
    --hero-text: #f3f4fc;
    --hero-text-2: #b4b9d8;
    --icon-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --card-shadow: none;
    --mark-bg: #4a3b0a;
    --mark-text: #ffe08a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; } /* 680px text column + padding */

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 6px rgba(58, 68, 130, 0.25); }
.site-nav { display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--text-2); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-text);
  text-align: center;
  padding: 88px 0 96px;
}
/* Soft glow behind the icon */
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 640px;
  height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--hero-glow), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-icon { width: 120px; height: 120px; border-radius: 27px; box-shadow: var(--icon-shadow); }
.hero h1 { font-size: clamp(40px, 7.5vw, 60px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; margin: 28px 0 14px; }
.hero p { font-size: clamp(18px, 3.2vw, 22px); line-height: 1.45; color: var(--hero-text-2); max-width: 520px; margin: 0 auto 36px; text-wrap: balance; }

/* Replace with Apple's official "Download on the App Store" badge when the app is live. */
.badge-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #11131f;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 20px -8px rgba(20, 24, 60, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.badge-placeholder:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(20, 24, 60, 0.55); }
.badge-placeholder svg { width: 20px; height: 20px; }

/* Features */
.features { padding-block: 24px 88px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 24px;
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h2 { font-size: 17px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--text-2); font-size: 15px; }

/* Documents (privacy, terms, support) */
.doc { padding-block: 48px 64px; }
.doc h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
.doc h2 { font-size: 21px; line-height: 1.3; margin: 40px 0 10px; }
.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc ul { margin: 0 0 16px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .meta { color: var(--text-2); font-size: 15px; margin-bottom: 32px; }
.doc .lead { font-size: 19px; color: var(--text-2); }

.table-scroll { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: 10px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { background: var(--bg-alt); font-weight: 600; }

/* Unfilled placeholders stay visible until replaced */
.ph {
  background: var(--mark-bg);
  color: var(--mark-text);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 24px;
}
.card p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 32px; font-size: 14px; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .site-nav { gap: 14px; font-size: 14px; }
  .hero { padding: 64px 0 72px; }
  .hero-icon { width: 104px; height: 104px; border-radius: 23px; }
  .doc { padding-block: 32px 48px; }
}
