/* Big Tree Publications
   Palette lifted from the apps' own Theme.swift so the site and the
   software are literally the same colours. */

:root {
  --paper:        #f7f0e4;   /* warm paper background */
  --paper-deep:   #efe5d2;   /* sidebar beige, banding */
  --panel:        #fffcf5;   /* raised card */
  --field:        #f1e6d3;
  --ink:          #2b2520;   /* warm near-black text */
  --sub:          #8b7d6b;   /* warm gray, darkened from app for web contrast */
  --sub-soft:     #9c8f7e;
  --clay:         #c8643c;   /* accent */
  --clay-light:   #d3764f;
  --clay-deep:    #a44e2c;
  --blue:         #26456b;   /* deep blue, the app's "ink" for values */
  --blue-bright:  #4e7ee7;
  --line:         rgba(80, 55, 35, 0.13);
  --line-soft:    rgba(80, 55, 35, 0.08);

  /* Kin's 12-hue wheel, used for gradient avatars and decorative dots */
  --h1:#e77b4e; --h2:#d9ab36; --h3:#a9c437; --h4:#66cc41;
  --h5:#3ecc6c; --h6:#3cc9ad; --h7:#41b1d4; --h8:#4e7ee7;
  --h9:#7a5ae7; --h10:#c45ee7; --h11:#e75cc3; --h12:#e75679;

  /* Headings use Avenir Next, the same face Shrink Books uses for its
     PageTitle: the app's "structural voice". Body stays rounded, the
     app's "warm voice" for names and money. Same pairing, same reason. */
  --display: "Avenir Next", "Avenir", "Nunito Sans", "Segoe UI",
             system-ui, -apple-system, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
           "Segoe UI", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(74, 52, 32, 0.06);
  --shadow:    0 1px 2px rgba(74, 52, 32, 0.05), 0 10px 28px -10px rgba(74, 52, 32, 0.16);
  --shadow-lg: 0 2px 4px rgba(74, 52, 32, 0.05), 0 26px 60px -22px rgba(74, 52, 32, 0.28);

  --r-sm: 12px; --r: 18px; --r-lg: 26px; --r-xl: 34px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 620px at 82% -8%,  rgba(200, 100, 60, 0.10), transparent 62%),
    radial-gradient(900px 560px at 6% 4%,     rgba(78, 126, 231, 0.075), transparent 60%),
    radial-gradient(760px 620px at 50% 108%,  rgba(217, 171, 54, 0.09), transparent 62%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--round);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--clay-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

/* ---------- type ---------- */

h1, h2, h3, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.021em; }
h1 { font-size: clamp(2.45rem, 5.8vw, 3.95rem); line-height: 1.08; margin: 0 0 1rem; text-wrap: balance; letter-spacing: -0.032em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); line-height: 1.18; margin: 0 0 0.85rem; letter-spacing: -0.026em; }
h3 { font-size: 1.24rem; line-height: 1.34; margin: 0 0 0.45rem; font-weight: 600; letter-spacing: -0.015em; }

.lede { font-size: clamp(1.12rem, 1.9vw, 1.34rem); color: var(--sub); line-height: 1.6; margin: 0 0 1.9rem; }
.eyebrow {
  font-family: var(--round); font-size: 0.775rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--clay);
  margin: 0 0 0.9rem;
}
.muted { color: var(--sub); }
.small { font-size: 0.92rem; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(247, 240, 228, 0.82);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1.4rem;
  min-height: 68px; padding-block: 0.6rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-size: 1.04rem; font-weight: 600; letter-spacing: -0.018em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.nav a {
  color: var(--sub); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 0.42rem 0.78rem; border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.nav a:hover { color: var(--ink); background: rgba(80, 55, 35, 0.07); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(200, 100, 60, 0.13); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.78rem 1.5rem; border-radius: 999px;
  font-family: var(--round); font-size: 1rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s;
}
.btn-primary {
  background: linear-gradient(180deg, var(--clay-light), var(--clay));
  color: #fff; box-shadow: 0 1px 2px rgba(120, 60, 30, 0.22), 0 10px 22px -10px rgba(180, 84, 46, 0.7);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(120,60,30,.22), 0 16px 30px -12px rgba(180,84,46,.8); }
.btn-ghost {
  background: var(--panel); color: var(--ink);
  border-color: var(--line); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn[aria-disabled="true"] {
  background: var(--field); color: var(--sub); border-color: var(--line);
  box-shadow: none; cursor: default; pointer-events: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ---------- cards ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.card-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tight { padding-block: clamp(2.2rem, 5vw, 3.4rem); }

/* ---------- pills ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.36rem 0.9rem 0.36rem 0.7rem; border-radius: 999px;
  font-size: 0.86rem; font-weight: 600; line-height: 1.4;
  background: var(--field); color: var(--blue);
  border: 1px solid var(--line);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-bright); flex: none; }
.pill-clay { background: rgba(200, 100, 60, 0.12); color: var(--clay-deep); border-color: rgba(200,100,60,.24); }
.pill-clay .dot { background: var(--clay); }

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

.hero { padding-block: clamp(3.6rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4rem); position: relative; overflow: hidden; }
.hero-split { display: grid; gap: clamp(2rem, 5vw, 3.6rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero-split { grid-template-columns: 1.08fr 0.92fr; } }

/* floating gradient avatar cluster (the Kin vibe) */
.avatar-cloud { position: relative; aspect-ratio: 1 / 0.92; }
.av {
  position: absolute; aspect-ratio: 1 / 1; border-radius: 50%;
  box-shadow: 0 2px 4px rgba(74,52,32,.10), 0 18px 36px -14px rgba(74,52,32,.4);
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-family: var(--round);
  letter-spacing: 0.01em;
  animation: bob 7s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(-11px) }
}
@media (prefers-reduced-motion: reduce) {
  .av { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- feature rows ---------- */

.feature { display: grid; gap: 0.5rem; }
.ico {
  width: 42px; height: 42px; flex: none; border-radius: 13px;
  display: grid; place-items: center;
  margin-bottom: 0.85rem; box-shadow: var(--shadow-sm);
}
.feature p { margin: 0; color: var(--sub); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--sub); }
.checklist strong { color: var(--ink); font-weight: 600; }
.checklist .tick { flex: none; margin-top: 0.28rem; color: var(--clay); }

/* ---------- app icon ---------- */

.appicon {
  width: 108px; height: 108px; border-radius: 24px;
  box-shadow: 0 2px 4px rgba(74,52,32,.10), 0 20px 44px -16px rgba(74,52,32,.42);
}
.appicon-lg { width: 132px; height: 132px; border-radius: 29px; }

/* ---------- portrait ---------- */

.portrait {
  width: 100%; max-width: 340px; aspect-ratio: 1 / 1;
  object-fit: cover; object-position: center 22%;
  border-radius: 50%;
  border: 5px solid var(--panel);
  box-shadow: 0 2px 6px rgba(74,52,32,.10), 0 24px 52px -18px rgba(74,52,32,.42);
}
.portrait-sm { max-width: 132px; border-width: 4px; }
.byline { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- shrinky ---------- */

.shrinky { width: min(320px, 78%); margin-inline: auto; filter: drop-shadow(0 26px 34px rgba(120, 62, 34, 0.26)); }
.shrinky-sm { width: 108px; }

/* ---------- prose (privacy page) ---------- */

.prose h2 { font-size: 1.42rem; margin-top: 2.3rem; margin-bottom: 0.5rem; }
.prose h2:first-of-type { margin-top: 0.6rem; }
.prose p { margin: 0 0 1.05rem; color: #453c33; }
.prose .kicker { font-size: 1.16rem; font-weight: 600; color: var(--ink); font-family: var(--display); letter-spacing: -0.018em; }

/* ---------- notice ---------- */

.notice {
  border-left: 4px solid var(--blue-bright);
  background: rgba(78, 126, 231, 0.075);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 1rem 1.2rem; margin: 1.4rem 0;
}
.notice p:last-child { margin-bottom: 0; }

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

.site-foot {
  border-top: 1px solid var(--line);
  background: rgba(239, 229, 210, 0.5);
  padding-block: 2.6rem 3rem; margin-top: 2rem;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 1.6rem 3rem; align-items: flex-start; }
.foot-grid nav { display: grid; gap: 0.4rem; }
.foot-grid nav a { color: var(--sub); text-decoration: none; font-size: 0.95rem; }
.foot-grid nav a:hover { color: var(--clay-deep); }
.foot-title { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--sub-soft); margin-bottom: 0.2rem; }
.foot-legal { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); color: var(--sub); font-size: 0.9rem; }

/* ---------- screenshot frame ---------- */

.shot {
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--panel);
}
.shot img { width: 100%; }
.shot figcaption { padding: 0.85rem 1.1rem; font-size: 0.9rem; color: var(--sub); border-top: 1px solid var(--line-soft); }

.shot-placeholder {
  aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center;
  background:
    repeating-linear-gradient(135deg, rgba(80,55,35,.028) 0 12px, transparent 12px 24px),
    var(--field);
  color: var(--sub); font-size: 0.93rem; padding: 1.5rem;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--panel); color: var(--ink); padding: 0.7rem 1.1rem; border-radius: var(--r-sm);
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; box-shadow: var(--shadow); }
