@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --coral: #ff6b81;
  --coral-dark: #e8536a;
  --peach: #ffb4a2;
  --cream: #fff8f3;
  --cream-2: #fdeee7;
  --ink: #2c2230;
  --ink-soft: #6b5c68;
  --line: #f0dfd8;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(230, 100, 110, 0.12);
  --radius: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
}

p { line-height: 1.65; color: var(--ink-soft); margin: 0 0 1em; }
a { color: inherit; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1040px;
  margin: 0 auto;
}
.logo {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.nav-links a:hover { color: var(--coral); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  color: white;
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(230,100,110,.22); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--coral); color: var(--coral); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none !important; }

/* Hero */
.hero {
  text-align: center;
  padding: 60px 24px 40px;
}
.eyebrow {
  display: inline-block;
  background: var(--cream-2);
  color: var(--coral-dark);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(32px, 6vw, 54px); max-width: 780px; margin-left: auto; margin-right: auto; }
.hero .sub { font-size: 18px; max-width: 560px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 16px; font-size: 13px; color: var(--ink-soft); }

/* Type strip on landing */
.hero-photo {
  display: block;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 24px;
  margin: 32px auto 0;
  box-shadow: var(--shadow);
}

.type-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  max-width: 720px;
  margin: 32px auto 0;
}
.type-chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--coral-dark);
}

/* Sections */
.section { padding: 60px 24px; }
.section-head { text-align: center; max-width: 600px; margin: 0 auto 40px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.feature-card .icon { font-size: 30px; margin-bottom: 12px; display: block; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; margin: 0; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}
.footer a { text-decoration: none; color: var(--ink-soft); margin: 0 8px; }
.footer a:hover { color: var(--coral); }

/* Ad slot placeholder */
.ad-slot {
  max-width: 728px;
  margin: 36px auto;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 12px;
  background: repeating-linear-gradient(45deg, var(--white), var(--white) 10px, var(--cream-2) 10px, var(--cream-2) 20px);
}

/* ===== Quiz ===== */
.quiz-shell {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 24px;
}
.progress-track {
  height: 8px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--peach), var(--coral));
  border-radius: 999px;
  transition: width .35s ease;
  width: 0%;
}
.progress-label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 30px;
}
.question-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
}
.question-text {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}
.question-help {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.option-list { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
  text-align: left;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 18px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.option-btn:hover { border-color: var(--peach); background: var(--cream-2); }
.option-btn.selected { border-color: var(--coral); background: var(--cream-2); }
.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.quiz-back {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.quiz-back:hover { color: var(--coral); }
.quiz-back[disabled] { visibility: hidden; }

/* ===== Result ===== */
.result-hero {
  text-align: center;
  padding: 56px 24px 20px;
}
.result-code {
  display: inline-block;
  letter-spacing: .15em;
  font-weight: 700;
  font-size: 13px;
  color: var(--coral-dark);
  background: var(--cream-2);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.result-name { font-size: clamp(28px, 5vw, 44px); }
.result-tagline { font-size: 17px; max-width: 480px; margin: 0 auto 24px; }

.result-card {
  max-width: 420px;
  margin: 0 auto 32px;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.result-card .rc-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--cream-2); }
.result-card .rc-body {
  background: linear-gradient(160deg, var(--coral), var(--coral-dark));
  padding: 24px 28px 30px;
  color: white;
  text-align: center;
}
.result-card .rc-label { font-size: 12px; letter-spacing: .1em; opacity: .8; font-weight: 700; }
.result-card .rc-code { font-family: 'Fraunces', serif; font-size: 46px; font-weight: 700; margin: 6px 0; }
.result-card .rc-name { font-size: 20px; font-weight: 700; }
.result-card .rc-url { font-size: 12px; opacity: .75; margin-top: 14px; }

.type-hero-img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 20px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow);
  background: var(--cream-2);
}

.traits {
  max-width: 640px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.trait-row .trait-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.trait-labels .active { color: var(--coral-dark); }
.trait-bar { height: 10px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.trait-bar-fill { height: 100%; background: linear-gradient(90deg, var(--peach), var(--coral)); }

.detail-grid {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-box { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.detail-box h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--coral-dark); margin-bottom: 12px; }
.detail-box ul { margin: 0; padding-left: 18px; }
.detail-box li { margin-bottom: 8px; font-size: 14px; color: var(--ink-soft); }

.match-strip {
  max-width: 720px;
  margin: 32px auto;
  display: flex;
  gap: 16px;
}
.match-box { flex: 1; text-align: center; background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.match-box .m-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--ink-soft); text-transform: uppercase; }
.match-box .m-code { font-family: 'Fraunces', serif; font-size: 24px; margin: 6px 0 2px; }
.match-box.good .m-code { color: var(--coral-dark); }

.share-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 32px 0; }

.upsell {
  max-width: 640px;
  margin: 20px auto 60px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.upsell h3 { margin-bottom: 6px; }
.upsell p { font-size: 14px; max-width: 420px; margin: 0 auto 18px; }

/* ===== Compatibility ===== */
.compat-form {
  max-width: 560px;
  margin: 0 auto 40px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.compat-field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.compat-field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--line);
  font-family: inherit;
  font-size: 15px;
  background: var(--cream);
  color: var(--ink);
}
.compat-result { max-width: 560px; margin: 0 auto; text-align: center; }
.compat-score { font-family: 'Fraunces', serif; font-size: 64px; color: var(--coral-dark); margin: 0; }
.compat-score span { font-size: 26px; }

/* ===== Type index / blog-ish pages ===== */
.type-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.type-index-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.type-index-card .tic-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--cream-2); }
.type-index-card .tic-body { padding: 16px 20px 20px; }
.type-index-card .tic-code { font-size: 12px; font-weight: 700; color: var(--coral-dark); letter-spacing: .08em; }
.type-index-card h3 { font-size: 17px; margin: 6px 0 4px; }
.type-index-card p { font-size: 13px; margin: 0; }

@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .type-index-grid { grid-template-columns: 1fr; }
  .type-strip { grid-template-columns: repeat(4, 1fr); }
  .hero-photo { aspect-ratio: 4 / 3; }
  .match-strip { flex-direction: column; }
  .question-card { padding: 28px 20px; }
}
