/*
Theme Name:  Chipi
Theme URI:   https://chipi.social
Author:      Chipi
Author URI:  https://chipi.social
Description: Official theme for Chipi — content and ads at honest prices.
Version:     1.0.0
License:     All Rights Reserved
Text Domain: chipi
*/

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:     #FEFEF4;
  --text:   #161616;
  --muted:  #888;
  --accent: #FFE600;
  --border: #E2E2D8;
  --mono:   'DM Mono', monospace;
  --serif:  'DM Serif Display', serif;
}

/* ── BASE ───────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.75;
  min-height: 100vh;
}

a { color: inherit; }

.wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HEADER ─────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  font-family: var(--serif);
  font-size: 1.65rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 3px;
  vertical-align: super;
}

nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: baseline;
}

nav a {
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 3px;
  transition: background 0.1s;
}

nav a:hover { background: var(--accent); }

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 540px;
}

.hero p {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.85;
}

.hero p strong { color: var(--text); font-weight: 500; }

/* ── MANIFESTO LIST ─────────────────────────────────────── */
.manifesto { padding: 0.5rem 0 0; }

.manifesto-item {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.manifesto-item:first-child { border-top: 1px solid var(--border); }

.num {
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 2rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  opacity: 0;
  animation: numTick 0.7s ease forwards;
}

.manifesto-item a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 400;
  padding: 0 3px;
  transition: background 0.1s;
}

.manifesto-item a:hover { background: var(--accent); }

/* ── SECTION LABEL ──────────────────────────────────────── */
.section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  padding: 3.5rem 0 1.25rem;
}

/* ── SERVICES ───────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.service {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.service h3 {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.service p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ── PRICING ────────────────────────────────────────────── */
.trial-banner {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  background: var(--accent);
  border: 1px solid var(--text);
  border-bottom: none;
  flex-wrap: wrap;
}

.trial-badge {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
}

.trial-banner p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: #333;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.plan {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.plan.featured {
  background: var(--text);
  color: var(--bg);
}

.plan-name {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--muted);
}

.plan.featured .plan-name { color: #888; }

.plan-price {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

.plan-period {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.plan.featured .plan-period { color: #888; }

.plan ul {
  list-style: none;
  font-size: 0.78rem;
  line-height: 2.1;
}

.plan ul li::before { content: "— "; color: var(--muted); }
.plan.featured ul li::before { color: #666; }

.plan-tag {
  display: inline-block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  background: var(--accent);
  color: var(--text);
  padding: 2px 6px;
  margin-bottom: 0.75rem;
}

.plan-cta {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: background 0.1s;
}

.plan-cta:hover { background: var(--accent); color: var(--text); }

.plan-addon {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

/* ── DARK STRIP ─────────────────────────────────────────── */
.strip {
  position: relative;
  overflow: hidden;
  background: var(--text);
  color: var(--bg);
  padding: 3.5rem 2rem;
  margin: 3.5rem -2rem;
}

.strip::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.strip h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  max-width: 500px;
}

.strip p {
  font-size: 0.85rem;
  color: #aaa;
  max-width: 480px;
  line-height: 1.85;
  margin-bottom: 2rem;
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--bg);
  color: var(--bg);
  padding: 0.7rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.btn-outline:hover { background: var(--accent); color: var(--text); border-color: var(--accent); }

/* ── HOW IT WORKS ───────────────────────────────────────── */
.steps { padding-bottom: 1rem; }

.step {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  max-width: 600px;
}

.step h3 {
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.step p { font-size: 0.82rem; color: var(--muted); line-height: 1.8; }

/* ── PRINCIPLES ─────────────────────────────────────────── */
.principle {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  max-width: 620px;
  scroll-margin-top: 80px;
}

.principle-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.principle-num {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.principle h2 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.principle p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 0.9rem;
}

.principle p:last-child { margin-bottom: 0; }
.principle p strong { color: var(--text); font-weight: 500; }

.back-top {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  margin-top: 1.5rem;
  transition: color 0.1s, background 0.1s;
  padding: 1px 3px;
}

.back-top:hover { background: var(--accent); color: var(--text); }

/* ── CONTACT ────────────────────────────────────────────── */
.contact-section {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--border);
}

.contact-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.contact-section > p {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 2.5rem;
}

/* ── FOOTER ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 1px 3px;
  transition: background 0.1s, color 0.1s;
}

.footer-links a:hover { background: var(--accent); color: var(--text); }

.footer-copy {
  margin-top: 2rem;
  font-size: 0.74rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

/* ── GRAIN OVERLAY ──────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── HERO HIGHLIGHT ─────────────────────────────────────── */
.highlight {
  background: var(--accent);
  padding: 0 5px 2px;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes numTick {
  0%   { color: var(--accent); transform: scale(1.15); }
  40%  { color: var(--accent); }
  100% { color: var(--muted);  transform: scale(1); }
}

.hero h1 { animation: fadeUp 0.5s ease both; }
.hero p  { animation: fadeUp 0.5s 0.1s ease both; }

.manifesto-item {
  opacity: 0;
  animation: fadeUp 0.35s ease forwards;
}

.manifesto-item:nth-child(1)  { animation-delay: 0.28s; }
.manifesto-item:nth-child(2)  { animation-delay: 0.34s; }
.manifesto-item:nth-child(3)  { animation-delay: 0.40s; }
.manifesto-item:nth-child(4)  { animation-delay: 0.46s; }
.manifesto-item:nth-child(5)  { animation-delay: 0.52s; }
.manifesto-item:nth-child(6)  { animation-delay: 0.58s; }
.manifesto-item:nth-child(7)  { animation-delay: 0.64s; }
.manifesto-item:nth-child(8)  { animation-delay: 0.70s; }
.manifesto-item:nth-child(9)  { animation-delay: 0.76s; }
.manifesto-item:nth-child(10) { animation-delay: 0.82s; }
.manifesto-item:nth-child(11) { animation-delay: 0.88s; }
.manifesto-item:nth-child(12) { animation-delay: 0.94s; }
.manifesto-item:nth-child(13) { animation-delay: 1.00s; }

.manifesto-item:nth-child(1)  .num { animation-delay: 0.28s; }
.manifesto-item:nth-child(2)  .num { animation-delay: 0.34s; }
.manifesto-item:nth-child(3)  .num { animation-delay: 0.40s; }
.manifesto-item:nth-child(4)  .num { animation-delay: 0.46s; }
.manifesto-item:nth-child(5)  .num { animation-delay: 0.52s; }
.manifesto-item:nth-child(6)  .num { animation-delay: 0.58s; }
.manifesto-item:nth-child(7)  .num { animation-delay: 0.64s; }
.manifesto-item:nth-child(8)  .num { animation-delay: 0.70s; }
.manifesto-item:nth-child(9)  .num { animation-delay: 0.76s; }
.manifesto-item:nth-child(10) .num { animation-delay: 0.82s; }
.manifesto-item:nth-child(11) .num { animation-delay: 0.88s; }
.manifesto-item:nth-child(12) .num { animation-delay: 0.94s; }
.manifesto-item:nth-child(13) .num { animation-delay: 1.00s; }

/* ── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-inner { flex-direction: column; gap: 0.6rem; }
  .services-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .strip { margin: 3rem -2rem; }
}
