:root {
  --orange: #ff8a00;
  --deep-orange: #f36b00;
  --yellow: #ffd429;
  --navy: #001b3a;
  --navy-soft: #17355d;
  --cream: #fff9ee;
  --white: #ffffff;
  --gray: #e9e3d8;
  --gray-deep: #c9c0b1;
  --shadow: 0 24px 60px rgba(0, 27, 58, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --transition: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--navy);
  background:
    radial-gradient(circle at top left, rgba(255, 212, 41, 0.4), transparent 25%),
    radial-gradient(circle at 85% 12%, rgba(255, 138, 0, 0.16), transparent 20%),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 50%, #fff7e8 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(0, 27, 58, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  color: var(--navy);
  padding: 0.95rem 1rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(255, 138, 0, 0.8);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.section {
  padding: 2.4rem 0;
}

.site-header,
.site-footer,
.site-nav,
.hero-actions,
.hero-highlights,
.form-actions,
.result-topline,
.score-shell,
.template-card,
.tip-card,
.formula-card,
.path-steps li,
.brand,
.brand-copy {
  display: flex;
}

.site-header,
.site-footer,
.site-nav,
.hero-actions,
.hero-highlights,
.form-actions,
.result-topline,
.score-shell,
.brand,
.brand-copy {
  align-items: center;
}

.site-header,
.result-topline,
.template-card {
  justify-content: space-between;
}

.brand-copy,
.hero-highlights,
.path-steps,
.field,
.card-header,
.message-heading,
.score-copy,
.objection-card,
.tip-card,
.formula-card {
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(0, 27, 58, 0.08);
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 30px rgba(0, 27, 58, 0.08);
}

.brand {
  gap: 0.85rem;
  min-width: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(0, 27, 58, 0.12);
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand-copy span:last-child {
  color: var(--navy-soft);
  font-size: 0.88rem;
}

.site-nav {
  gap: 1.2rem;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.95rem;
  color: rgba(0, 27, 58, 0.75);
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--deep-orange);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    color var(--transition);
}

.button:hover,
.chip-button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--orange), var(--deep-orange));
  color: var(--white);
  box-shadow: 0 18px 28px rgba(243, 107, 0, 0.26);
  padding: 0.95rem 1.4rem;
}

.button-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid rgba(0, 27, 58, 0.1);
  padding: 0.9rem 1.25rem;
}

.button-ghost {
  background: transparent;
  color: var(--navy);
  padding: 0.9rem 1.2rem;
}

.button.small {
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2rem;
  align-items: center;
  padding-top: 3rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--deep-orange);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3.2rem, 8vw, 5.6rem);
}

.hero-text,
.section-heading p,
.path-steps p,
.formula-card p,
.template-card p,
.tip-card p,
.card-header p,
.score-copy p,
.site-footer p {
  color: rgba(0, 27, 58, 0.74);
}

.hero-text {
  max-width: 58ch;
  margin: 1.2rem 0 1.5rem;
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-highlights {
  gap: 0.8rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-highlights li {
  position: relative;
  padding-left: 1.6rem;
  color: rgba(0, 27, 58, 0.85);
}

.hero-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  box-shadow: 0 0 0 6px rgba(255, 212, 41, 0.2);
}

.hero-visual {
  position: relative;
}

.visual-card,
.card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 27, 58, 0.08);
  box-shadow: var(--shadow);
}

.visual-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem;
}

.visual-card::before,
.visual-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.visual-card::before {
  inset: auto -10% -22% 24%;
  height: 280px;
  border: 28px solid rgba(255, 138, 0, 0.18);
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(16deg);
}

.visual-card::after {
  right: -4rem;
  top: -3rem;
  width: 11rem;
  height: 11rem;
  background: radial-gradient(circle, rgba(255, 212, 41, 0.75), transparent 60%);
}

.path-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.96);
}

.path-rail span {
  position: relative;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(0, 27, 58, 0.72);
}

.path-rail span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.6rem;
  width: 0.6rem;
  height: 0.6rem;
  margin-left: -0.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
}

.hero-score {
  margin: 3rem 0 1.6rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 27, 58, 0.97), rgba(23, 53, 93, 0.95));
  color: var(--white);
}

.hero-score p,
.hero-score strong {
  margin: 0;
}

.hero-score p {
  opacity: 0.75;
}

.hero-score strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.3rem;
}

.path-steps {
  position: relative;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0.8rem 0 0;
}

.path-steps li {
  gap: 0.95rem;
  align-items: flex-start;
}

.step-dot {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 0.28rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  box-shadow: 0 0 0 8px rgba(255, 138, 0, 0.15);
}

.path-steps strong,
.formula-card h3,
.template-card h3,
.tip-card h3,
.card-header h3,
.message-heading h4 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.path-steps p,
.formula-card p,
.template-card p,
.tip-card p,
.card-header p,
.score-copy p,
.objection-summary {
  margin: 0.35rem 0 0;
  line-height: 1.6;
}

.compact {
  margin-bottom: 1rem;
}

.section-heading {
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 3.45rem);
}

.section-heading p {
  max-width: 60ch;
  margin: 0.8rem 0 0;
  line-height: 1.7;
}

.formula-grid,
.tips-grid,
.template-grid {
  display: grid;
  gap: 1rem;
}

.formula-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.formula-card,
.tip-card {
  padding: 1.2rem;
  gap: 0.7rem;
}

.formula-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-weight: 800;
  color: var(--navy);
  background: linear-gradient(135deg, var(--yellow), #ffe472);
}

.formula-card h3,
.template-card h3,
.tip-card h3,
.card-header h3,
.message-heading h4 {
  margin: 0;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1.2rem;
  align-items: start;
}

.card {
  padding: 1.45rem;
}

.card-header {
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.field {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.field span {
  font-weight: 700;
  color: var(--navy);
}

.field textarea {
  resize: vertical;
  min-height: 3.25rem;
}

.form-actions {
  gap: 0.85rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.error-banner {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 138, 0, 0.14);
  border: 1px solid rgba(243, 107, 0, 0.2);
  color: var(--navy);
  font-weight: 700;
}

.builder-aside {
  display: grid;
  gap: 1rem;
}

.score-shell {
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 212, 41, 0.18), rgba(255, 255, 255, 0.92));
}

.score-ring {
  --score-angle: 0deg;
  position: relative;
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) var(--score-angle), rgba(0, 27, 58, 0.1) 0deg);
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--white);
}

.score-ring span {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 800;
}

.score-copy strong {
  font-size: 1.1rem;
}

.message-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 238, 0.8);
  border: 1px solid rgba(0, 27, 58, 0.08);
}

.generated-message {
  margin: 0.8rem 0 0;
  white-space: pre-line;
  line-height: 1.75;
  color: rgba(0, 27, 58, 0.88);
}

.generated-message.empty-state {
  color: rgba(0, 27, 58, 0.6);
}

.improvement-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.chip-button {
  border: 1px solid rgba(0, 27, 58, 0.08);
  border-radius: 999px;
  background: var(--white);
  padding: 0.7rem 0.95rem;
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.chip-button:hover {
  border-color: rgba(255, 138, 0, 0.4);
  background: rgba(255, 249, 238, 0.96);
}

.status-message {
  min-height: 1.4rem;
  margin: 0.85rem 0 0;
  color: var(--deep-orange);
  font-weight: 700;
}

.objection-summary {
  margin-bottom: 1rem;
}

.objection-response {
  margin: 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 249, 238, 0.9);
  line-height: 1.75;
  color: rgba(0, 27, 58, 0.84);
}

.template-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.template-card {
  gap: 1rem;
  align-items: flex-start;
}

.template-tag {
  margin: 0 0 0.55rem;
  color: var(--deep-orange);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tips-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(0, 27, 58, 0.08);
}

@media (max-width: 1120px) {
  .formula-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .site-header {
    flex-wrap: wrap;
    border-radius: 28px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .header-cta {
    margin-left: auto;
  }

  .hero,
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .template-grid,
  .tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1200px);
  }

  .section {
    padding: 1.8rem 0;
  }

  .site-header {
    top: 0.5rem;
    padding: 0.9rem;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .section-heading h2 {
    font-size: 2.25rem;
  }

  .formula-grid,
  .template-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .path-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 1.2rem;
  }

  .score-shell,
  .site-footer,
  .result-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-actions,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .chip-button {
    width: 100%;
  }
}
