/* heykeinplan — Bold, warm, creative */

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

:root {
  --font: 'Figtree', -apple-system, sans-serif;
  --dark: #14142B;
  --dark-2: #1E1E38;
  --accent: #E8563F;
  --accent-hover: #D14A32;
  --accent-light: #FDF0ED;
  --accent-soft: rgba(232, 86, 63, 0.08);
  --warm-bg: #FEFCF9;
  --warm-section: #F5EDE4;
  --text: #1B1B2E;
  --text-2: #5E5C6B;
  --text-3: #9B99A7;
  --text-inv: #FEFCF9;
  --text-inv-2: rgba(254,252,249,0.6);
  --border: #E8E6E2;
  --border-soft: #F0EDE8;
  --col-fix: #7C3AED;
  --col-var: #E8563F;
  --col-rem: #059669;
  --shadow: 0 2px 8px rgba(20,20,43,0.04), 0 12px 48px rgba(20,20,43,0.08);
  --shadow-lg: 0 8px 24px rgba(20,20,43,0.06), 0 24px 64px rgba(20,20,43,0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--warm-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ======= REVEALS ======= */
.reveal {
  opacity: 0;
  transform: translateY(36px) scale(0.97);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }
.rd1 { transition-delay: 0.08s; }
.rd2 { transition-delay: 0.16s; }
.rd3 { transition-delay: 0.24s; }

/* Hero stagger */
@keyframes heroUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
.h-anim { opacity: 0; animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.h-d1 { animation-delay: 0.2s; }
.h-d2 { animation-delay: 0.4s; }
.h-d3 { animation-delay: 0.55s; }

/* ======= NAV ======= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px; transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 740px; margin: 0 auto;
}
.logo {
  font-size: 1.1rem; font-weight: 700; text-decoration: none;
  letter-spacing: -0.4px; color: var(--text-inv);
  transition: color 0.3s;
}
.nav.scrolled .logo { color: var(--text); }
.nav.scrolled {
  background: rgba(254,252,249,0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-cta {
  padding: 8px 18px; background: var(--accent); color: #fff;
  border-radius: 8px; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,86,63,0.3);
}

/* ======= HERO ======= */
.hero {
  background: var(--dark);
  background-image: radial-gradient(rgba(254,252,249,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 160px 24px 140px;
  text-align: center;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to top, var(--warm-bg), transparent);
  pointer-events: none;
}
.hero-wrap { max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -1.8px; color: var(--text-inv);
  margin-bottom: 18px;
}
.hero h1 .hl {
  color: var(--accent);
  display: inline;
}
.hero p {
  font-size: 1.1rem; color: var(--text-inv-2);
  line-height: 1.5; margin-bottom: 32px; max-width: 400px; margin-left: auto; margin-right: auto;
}
.hero .cta-hero {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 36px; background: var(--accent); color: #fff;
  border-radius: 12px; font-family: var(--font);
  font-size: 1rem; font-weight: 700; text-decoration: none;
  border: none; cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(232,86,63,0.35);
}
.hero .cta-hero:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(232,86,63,0.45);
}
.hero .cta-hero:active { transform: scale(0.97); }
.cta-arrow {
  display: inline-block;
  transition: transform 0.2s;
}
.hero .cta-hero:hover .cta-arrow { transform: translateX(3px); }

.hero-meta {
  display: flex; justify-content: center; gap: 32px;
  margin-top: 40px;
}
.hero-meta span {
  font-size: 0.78rem; color: var(--text-inv-2);
  display: flex; flex-direction: column; gap: 2px;
}
.hero-meta strong {
  font-size: 1.15rem; font-weight: 700; color: var(--text-inv);
}

/* ======= BUTTONS ======= */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  font-family: var(--font); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.cta:hover {
  background: var(--accent-hover); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,86,63,0.25);
}
.cta:active { transform: scale(0.97); }
.cta.full { width: 100%; }

.ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; background: transparent;
  color: var(--text-2); border: 1.5px solid var(--border);
  border-radius: 10px; font-family: var(--font);
  font-size: 0.95rem; font-weight: 500; cursor: pointer;
  text-decoration: none; transition: all 0.2s;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ======= CALCULATOR ======= */
.tool {
  margin-top: -80px;
  position: relative; z-index: 2;
  padding: 0 24px 60px;
}
.tool .wrap { padding: 0; }

.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Progress tabs */
.progress {
  display: flex; background: var(--dark);
}
.prog-step {
  flex: 1; padding: 16px 12px; text-align: center;
  font-size: 0.78rem; font-weight: 500; color: rgba(254,252,249,0.4);
  cursor: pointer; position: relative;
  transition: color 0.3s, background 0.3s;
  border: none; background: none; font-family: var(--font);
}
.prog-step.active {
  color: #fff; background: rgba(254,252,249,0.06);
  font-weight: 600;
}
.prog-step.done { color: rgba(254,252,249,0.6); }
.prog-step.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--accent);
  animation: slideX 0.35s cubic-bezier(0.22,1,0.36,1);
}
@keyframes slideX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.card-body { padding: 32px; }

/* Steps */
.step { display: none; }
.step.active { display: block; animation: stepSlide 0.4s cubic-bezier(0.22,1,0.36,1); }
@keyframes stepSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

.step h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 20px; }
.step-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.step-head h2 { margin-bottom: 0; }
.live-sum {
  font-size: 0.82rem; font-weight: 700; color: var(--accent);
  background: var(--accent-light); padding: 5px 14px; border-radius: 20px;
  transition: transform 0.15s;
}
.live-sum.bump { animation: bumpPop 0.3s ease; }
@keyframes bumpPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Fields */
.field-big { margin-bottom: 28px; }
.field-big label { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.field-big small { display: block; font-size: 0.78rem; color: var(--text-3); margin-top: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field label {
  display: block; font-size: 0.8rem; font-weight: 500;
  color: var(--text-2); margin-bottom: 6px;
}

.inp-wrap { position: relative; }
.inp-wrap input {
  width: 100%; padding: 12px 46px 12px 14px;
  background: var(--warm-bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: 0.95rem; font-weight: 500;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.2s;
  -moz-appearance: textfield;
}
.inp-wrap input::-webkit-outer-spin-button,
.inp-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.inp-wrap input::placeholder { color: var(--text-3); }
.inp-wrap input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: #fff;
}
.inp-lg input { padding: 18px 56px 18px 20px; font-size: 1.35rem; font-weight: 700; }
.unit {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 0.82rem; font-weight: 500; color: var(--text-3); pointer-events: none;
}

.btn-row { display: flex; gap: 10px; margin-top: 28px; }
.btn-row .cta { flex: 1; }

/* ======= RESULTS ======= */
.res { padding: 40px 24px 70px; }
.res.show { display: block; animation: resReveal 0.7s cubic-bezier(0.22,1,0.36,1); }
@keyframes resReveal {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}

.res-top {
  text-align: center; margin-bottom: 28px;
  padding: 44px 24px;
  background: var(--dark);
  background-image: radial-gradient(rgba(254,252,249,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  border-radius: var(--radius);
}
.verdict {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  font-size: 0.82rem; font-weight: 600; margin-bottom: 18px;
}
.v-good { background: rgba(5,150,105,0.15); color: #34D399; }
.v-ok { background: rgba(245,158,11,0.15); color: #FBBF24; }
.v-bad { background: rgba(239,68,68,0.15); color: #F87171; }

.big-num { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.big-num small { font-size: 0.85rem; color: var(--text-inv-2); font-weight: 400; }
.big-num strong {
  font-size: clamp(3rem, 10vw, 4.2rem);
  font-weight: 800; letter-spacing: -2.5px; line-height: 1;
  color: var(--text-inv);
}
.big-num span { font-size: 0.92rem; color: var(--text-inv-2); font-weight: 500; }

/* Cards */
.res-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(20,20,43,0.03);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
}
.res-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.overview-row { display: flex; justify-content: space-between; margin-bottom: 16px; }
.overview-row span { display: flex; flex-direction: column; }
.overview-row em { font-size: 0.75rem; color: var(--text-3); font-style: normal; }
.overview-row strong { font-size: 1rem; font-weight: 700; }

.stack-bar {
  display: flex; height: 12px; border-radius: 50px;
  background: var(--border-soft); overflow: hidden; margin-bottom: 16px;
}
.sb { height: 100%; transition: width 1.2s cubic-bezier(0.22,1,0.36,1); }
.sb-f { background: var(--col-fix); border-radius: 50px 0 0 50px; }
.sb-v { background: var(--col-var); }
.sb-r { background: var(--col-rem); border-radius: 0 50px 50px 0; }

.legend { display: flex; flex-wrap: wrap; gap: 18px; }
.legend span { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--text-2); }
.legend b { font-weight: 700; color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-f { background: var(--col-fix); }
.dot-v { background: var(--col-var); }
.dot-r { background: var(--col-rem); }

/* Rule */
.rule-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.rule-hint { font-size: 0.78rem; color: var(--text-3); margin-bottom: 20px; }
.rules { display: flex; flex-direction: column; gap: 16px; }
.rule-row { display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 12px; }
.rl { font-size: 0.82rem; font-weight: 500; color: var(--text-2); }
.rt { position: relative; height: 8px; background: var(--border-soft); border-radius: 50px; }
.rf { position: absolute; top: 0; left: 0; height: 100%; border-radius: 50px; transition: width 1.2s cubic-bezier(0.22,1,0.36,1); width: 0; }
.rf-f { background: var(--col-fix); }
.rf-v { background: var(--col-var); }
.rf-r { background: var(--col-rem); }
.rm { position: absolute; top: -5px; width: 2px; height: 18px; background: var(--text); opacity: 0.15; border-radius: 1px; }
.rp { font-size: 0.85rem; font-weight: 700; text-align: right; }

/* Tips */
.tips { margin-bottom: 28px; }
.tips h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; }
#tipList { display: flex; flex-direction: column; gap: 10px; }

.tip {
  padding: 20px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
  opacity: 0; animation: tipIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes tipIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}
.tip:nth-child(2) { animation-delay: 0.08s; }
.tip:nth-child(3) { animation-delay: 0.16s; }
.tip:nth-child(4) { animation-delay: 0.24s; }
.tip:nth-child(5) { animation-delay: 0.32s; }

.tip:hover {
  transform: translateX(4px) translateY(-2px);
  box-shadow: 0 4px 16px rgba(20,20,43,0.06);
}
.tip-t { font-size: 0.92rem; font-weight: 700; margin-bottom: 4px; }
.tip-p { font-size: 0.84rem; color: var(--text-2); line-height: 1.55; margin-bottom: 10px; }
.tip-a {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  color: #fff; background: var(--accent); text-decoration: none;
  padding: 6px 14px; border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tip-a:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(232,86,63,0.3);
}

.res-actions { display: flex; gap: 12px; justify-content: center; padding-top: 8px; }

/* ======= CONTENT SECTION (Bento) ======= */
.content { padding: 100px 0; background: var(--warm-section); }
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.bento-main {
  grid-row: 1 / 3;
  background: #fff; border-radius: var(--radius); padding: 36px;
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}
.bento-main:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bento-main h2 {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.6px;
  margin-bottom: 16px; line-height: 1.2;
}
.bento-main p {
  font-size: 0.92rem; color: var(--text-2); line-height: 1.8; margin-bottom: 12px;
}

.bento-highlight {
  background: var(--accent); border-radius: var(--radius); padding: 28px;
  color: #fff;
  transition: transform 0.3s, box-shadow 0.3s;
}
.bento-highlight:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(232,86,63,0.25); }
.bento-highlight h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.5px; }
.bento-highlight p { font-size: 0.85rem; opacity: 0.88; line-height: 1.5; }

.bento-small {
  background: #fff; border-radius: var(--radius); padding: 24px;
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}
.bento-small:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bento-small h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.bento-small p { font-size: 0.84rem; color: var(--text-2); line-height: 1.6; }

/* ======= FAQ ======= */
.faq { padding: 90px 0; }
.faq-wrap { max-width: 620px; }
.faq h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 28px; }
.faq-list { display: flex; flex-direction: column; gap: 6px; }

.faq-list details {
  background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.faq-list details[open] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.faq-list summary {
  padding: 18px 22px; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  transition: color 0.2s;
}
.faq-list summary:hover { color: var(--accent); }
.faq-list summary::after {
  content: "+"; font-size: 1.25rem; font-weight: 400;
  color: var(--text-3); transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), color 0.2s;
  flex-shrink: 0; margin-left: 12px;
}
.faq-list details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details p {
  padding: 0 22px 18px; font-size: 0.88rem;
  color: var(--text-2); line-height: 1.7;
}

/* ======= FOOTER ======= */
.foot {
  background: var(--dark);
  background-image: radial-gradient(rgba(254,252,249,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 48px 24px 32px;
}
.foot .wrap { max-width: 740px; }
.foot-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.foot .logo { color: var(--text-inv); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { font-size: 0.8rem; color: var(--text-inv-2); text-decoration: none; transition: color 0.2s; }
.foot-links a:hover { color: var(--text-inv); }
.foot-aff { font-size: 0.72rem; color: var(--text-inv-2); margin-bottom: 8px; line-height: 1.5; opacity: 0.5; }
.foot-copy { font-size: 0.72rem; color: var(--text-inv-2); opacity: 0.5; }

/* ======= RESPONSIVE ======= */
@media (max-width: 640px) {
  .hero { padding: 130px 20px 120px; }
  .hero h1 { font-size: 2.2rem; letter-spacing: -1px; }
  .hero-meta { gap: 20px; }
  .tool { margin-top: -60px; }
  .card-body { padding: 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento-main { grid-row: auto; }
  .res-actions { flex-direction: column; }
  .progress { overflow-x: auto; }
  .foot-top { flex-direction: column; gap: 12px; align-items: flex-start; }
  .btn-row { flex-direction: column; }
  .rule-row { grid-template-columns: 48px 1fr 38px; }
  .res-top { padding: 32px 16px; }
}

/* ======= A11Y ======= */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .h-anim { animation: none; opacity: 1; }
  .step.active { animation: none; }
  .sb, .rf { transition: none; }
  .prog-step.active::after { animation: none; }
  .tip { animation: none; opacity: 1; }
}
::selection { background: var(--accent-light); color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
