/* Mainwick — shared stylesheet (home, Prism, blog) */

:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --ink: #16140f;
  --ink-2: #4a463d;
  --muted: #7d776b;
  --line: #e2dccf;
  --accent: #d6451f;
  --accent-ink: #ffffff;
  --btn: #16140f;
  --btn-ink: #f6f3ec;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110e;
    --surface: #1a1914;
    --ink: #f1ece1;
    --ink-2: #c4beb0;
    --muted: #8d877a;
    --line: #2c2a23;
    --accent: #ff6b3d;
    --accent-ink: #14120e;
    --btn: #f1ece1;
    --btn-ink: #12110e;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 64px; }
.logo {
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.logo::after { content: '.'; color: var(--accent); }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color .15s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.eyebrow.accent { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; }
.section { padding: clamp(56px, 9vw, 96px) 0; border-top: 1px solid var(--line); }
.section-title { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin-bottom: 40px; max-width: 18em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--btn); color: var(--btn-ink);
  padding: 14px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  width: fit-content; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: not-allowed; font-weight: 500; }
.btn.ghost:hover { transform: none; background: transparent; color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: clamp(64px, 12vw, 140px) 0 clamp(56px, 9vw, 104px); }
.hero h1 {
  font-size: clamp(64px, 14vw, 168px); font-weight: 700;
  line-height: 0.86; letter-spacing: -0.05em; margin-bottom: 40px;
}
.hero h1 .dot { color: var(--accent); }
.hero p.lead {
  font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 34em; line-height: 1.6;
  border-left: 2px solid var(--accent); padding-left: 20px;
}

/* ---------- venture cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 168px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-name { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.card-arrow { color: var(--muted); font-size: 18px; transition: color .15s, transform .15s; }
a.card:hover .card-arrow { color: var(--accent); transform: translate(2px, -2px); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-domain { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.tag {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px;
}

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-text { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.5; letter-spacing: -0.01em; }
.meta { list-style: none; }
.meta li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.meta li:last-child { border-bottom: 1px solid var(--line); }
.meta li span:first-child { color: var(--muted); }

/* ---------- post lists ---------- */
.post-list { list-style: none; }
.post-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline;
  padding: 24px 0; border-top: 1px solid var(--line); text-decoration: none;
}
.post-list li:last-child .post-row { border-bottom: 1px solid var(--line); }
.post-date { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.post-row h3 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.01em; margin-bottom: 6px; transition: color .15s; }
.post-row p { font-size: 15px; color: var(--ink-2); max-width: 40em; }
.post-row .card-arrow { align-self: center; }
.post-row:hover h3 { color: var(--accent); }
.post-row:hover .card-arrow { color: var(--accent); transform: translate(2px, -2px); }
.more { margin-top: 28px; font-size: 14px; }
.more a { color: var(--accent); text-decoration: none; font-weight: 600; }
.more a:hover { text-decoration: underline; }
.empty { color: var(--muted); padding: 24px 0; border-top: 1px solid var(--line); }

/* ---------- contact ---------- */
.contact { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 32px; }
.contact-email {
  font-family: var(--serif); font-size: clamp(24px, 5vw, 56px); font-weight: 700;
  letter-spacing: -0.03em; text-decoration: none; word-break: break-word;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .25s;
}
.contact-email:hover { background-size: 100% 2px; }
.contact-side { text-align: right; font-size: 14px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; font-size: 12px; color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- article (blog post) ---------- */
.article-head { padding: clamp(48px, 8vw, 96px) 0 40px; }
.article-head .back { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 32px; }
.article-head .back:hover { color: var(--accent); }
.article-head h1 { font-size: clamp(34px, 6vw, 64px); letter-spacing: -0.03em; line-height: 1.04; max-width: 15em; margin-bottom: 20px; }
.article-meta { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.prose { max-width: 680px; padding-bottom: 80px; font-family: var(--serif); font-size: 19px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.3em; }
.prose h2 { font-size: 30px; letter-spacing: -0.02em; color: var(--ink); margin-top: 2em; }
.prose h3 { font-size: 22px; color: var(--ink); margin-top: 1.8em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 20px; font-style: italic; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose code { font-family: var(--mono); font-size: 0.82em; background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 14px; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }

/* ---------- Prism product page ---------- */
.prism-hero { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: start; }
.prism-hero h1 { font-size: clamp(64px, 13vw, 140px); letter-spacing: -0.05em; line-height: 0.86; margin-bottom: 28px; }
.prism-hero .tagline { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.6vw, 28px); margin-bottom: 16px; }
.prism-hero .lead { margin-bottom: 36px; }
.app-icon {
  width: 120px; height: 120px; border-radius: 28px; flex-shrink: 0; margin-top: 8px;
  background: var(--btn); color: var(--btn-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 56px; font-weight: 700;
  box-shadow: 8px 8px 0 var(--accent);
}
.cta-group { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cta-note { font-size: 13px; color: var(--muted); }

.long-text { font-family: var(--serif); font-size: clamp(18px, 2vw, 21px); line-height: 1.75; color: var(--ink-2); max-width: 680px; }
.long-text p + p { margin-top: 1.1em; }

.modes { display: grid; gap: 0; }
.mode { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start; padding: 24px 0; border-top: 1px solid var(--line); }
.mode:last-child { border-bottom: 1px solid var(--line); }
.mode-tag { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 700; padding-top: 6px; }
.mode h3 { font-size: 22px; margin-bottom: 6px; }
.mode p { font-size: 15px; color: var(--ink-2); max-width: 40em; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.feature-num { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 20px; margin-bottom: 10px; }
.feature p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; }
.stat-num { font-family: var(--serif); font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-bottom: 10px; }
.stat-label { font-size: 13px; color: var(--muted); max-width: 14em; }

.download { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 32px; }
.download-info { text-align: right; }
.download-info .big { font-family: var(--serif); font-size: 36px; font-weight: 700; line-height: 1; }
.download-info .small { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 6px; }
  .post-row .card-arrow { display: none; }
  .contact-side { text-align: left; }
  .prism-hero { grid-template-columns: 1fr; }
  .app-icon { display: none; }
  .mode { grid-template-columns: 1fr; gap: 8px; }
  .download-info { text-align: left; }
  .prose { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
