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

:root {
  --navy:   #0f172a;
  --indigo: #1e3a5f;
  --accent: #c8a84b;
  --light:  #f8f9fb;
  --text:   #1e293b;
  --muted:  #64748b;
  --white:  #ffffff;
  --radius: 10px;
  --max-w:  1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Header / Nav ───────────────────────────────────────── */
header {
  background: var(--navy);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

.logo span { color: var(--accent); }

nav { display: flex; gap: 4px; flex-wrap: wrap; }

nav a {
  color: rgba(255,255,255,.8);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s, color .2s;
  text-decoration: none;
}

nav a:hover, nav a.active {
  background: rgba(255,255,255,.12);
  color: var(--white);
  text-decoration: none;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  padding: 32px 0;
  font-size: .85rem;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.6); }
.footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--indigo) 100%);
  color: var(--white);
  padding: 80px 0 72px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 em { color: var(--accent); font-style: normal; }

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-image {
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  overflow: hidden;
}

.hero-image img { width: 100%; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); text-decoration: none; }

.btn-primary { background: var(--accent); color: var(--navy); }
.btn-outline  { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: var(--white); color: var(--white); }

/* ── Section titles ─────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--light); }

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--navy);
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* ── Feature strip ──────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.feature-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 28px;
}

.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--navy); }
.feature-card p  { color: var(--muted); font-size: .9rem; }

/* ── Book catalog grid ──────────────────────────────────── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.book-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  text-decoration: none;
}

.book-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.book-card-body { padding: 14px; }
.book-vol   { font-size: .75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.book-title { font-size: .9rem;  font-weight: 600; color: var(--navy); margin: 4px 0 6px; line-height: 1.4; }
.book-desc  { font-size: .8rem;  color: var(--muted); line-height: 1.5; }

/* ── App feature rows ───────────────────────────────────── */
.app-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid #e2e8f0;
}

.app-feature:last-child { border-bottom: none; }
.app-feature.reverse    { direction: rtl; }
.app-feature.reverse > * { direction: ltr; }

.app-feature-text h3 { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.app-feature-text p  { color: var(--muted); line-height: 1.7; }

.app-screenshot {
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  overflow: hidden;
  background: var(--light);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
}

/* ── LCP badge ──────────────────────────────────────────── */
.lcp-box {
  background: linear-gradient(135deg, var(--navy), var(--indigo));
  color: var(--white);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.lcp-badge {
  font-size: 3rem;
  flex-shrink: 0;
}

.lcp-box h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--accent); }
.lcp-box p  { color: rgba(255,255,255,.8); font-size: .95rem; line-height: 1.6; }

/* ── Steps ──────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.step { text-align: center; padding: 24px; }

.step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.step p  { color: var(--muted); font-size: .9rem; }

/* ── Team ───────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.team-card {
  background: var(--light);
  border-radius: var(--radius);
  padding: 28px;
}

.team-card h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: 4px; }
.team-card .role { color: var(--accent); font-size: .85rem; font-weight: 600; margin-bottom: 10px; }
.team-card p { color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* ── Contact form ───────────────────────────────────────── */
.contact-form {
  max-width: 600px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

label { font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; display: block; }

input, textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
}

input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { min-height: 120px; resize: vertical; }

/* ── Legal pages ────────────────────────────────────────── */
.legal { max-width: 760px; margin: 48px auto; }
.legal h2 { font-size: 1.3rem; color: var(--navy); margin: 32px 0 10px; }
.legal h3 { font-size: 1rem; color: var(--navy); margin: 24px 0 8px; }
.legal p, .legal li { color: var(--muted); line-height: 1.8; margin-bottom: 10px; }
.legal ul { padding-left: 20px; }

/* ── Page hero (inner pages) ────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy), var(--indigo));
  color: var(--white);
  padding: 56px 0 48px;
  text-align: center;
}

.page-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.page-hero p  { color: rgba(255,255,255,.75); font-size: 1.05rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner   { grid-template-columns: 1fr; }
  .hero-image   { display: none; }
  .book-grid    { grid-template-columns: repeat(3, 1fr); }
  .features     { grid-template-columns: 1fr 1fr; }
  .app-feature  { grid-template-columns: 1fr; }
  .app-feature.reverse { direction: ltr; }
}

/* Contact page: form beside the direct contacts; stacked on narrow screens. */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  .book-grid    { grid-template-columns: repeat(2, 1fr); }
  .features     { grid-template-columns: 1fr; }
  .steps        { grid-template-columns: 1fr; }
  .team-grid    { grid-template-columns: 1fr; }
  .form-row     { grid-template-columns: 1fr; }
  .hero h1      { font-size: 1.8rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* App screenshots (deepmargin.html): the image sets the box's shape */
.app-screenshot.has-image { aspect-ratio: auto; background: none; }
.app-screenshot.has-image img { width: 100%; height: auto; }
