@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@200;300;400;500;600;700;900&family=Noto+Serif+KR:wght@400;700&display=swap');

*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f6f3ee;--bg-alt:#eee9e1;--card:#fff;
  --text:#2c2520;--text-sub:#7a706a;--text-light:#b0a89e;
  --accent:#c08b5c;--accent-dark:#a0714a;--accent-bg:rgba(192,139,92,.08);
  --border:#e4ddd5;
  --wood:#6aab6a;--fire:#d46b5e;--earth:#c9963e;--metal:#8e88b0;--water:#5a93b5;
  --wood-bg:#edf5ed;--fire-bg:#fbecea;--earth-bg:#f9f1e4;--metal-bg:#eeedF3;--water-bg:#e8f0f6;
  --r:14px;--r-sm:10px;
  --shadow:0 1px 4px rgba(50,40,30,.05);
  --shadow-md:0 6px 24px rgba(50,40,30,.07);
}
html{scroll-behavior:smooth}
body{
  font-family:'Noto Sans KR',-apple-system,sans-serif;
  background:var(--bg);color:var(--text);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* ── Navbar ── */
.navbar{
  position:fixed;top:0;width:100%;z-index:100;
  background:rgba(246,243,238,.85);backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(228,221,213,.6);
  transition:box-shadow .3s;
}
.navbar.scrolled{box-shadow:0 2px 12px rgba(50,40,30,.06)}
.nav-inner{
  max-width:1000px;margin:0 auto;
  display:flex;justify-content:space-between;align-items:center;
  height:56px;padding:0 1.5rem;
}
.logo{
  font-family:'Noto Serif KR',serif;font-size:1.15rem;font-weight:700;
  color:var(--text);text-decoration:none;
}
.logo span{color:var(--accent)}
.nav-links{display:flex;gap:1.8rem;list-style:none}
.nav-links a{
  color:var(--text-sub);text-decoration:none;font-size:.82rem;font-weight:400;
  transition:color .2s;letter-spacing:.3px;
}
.nav-links a:hover{color:var(--accent)}

/* ── Hero ── */
.hero{
  position:relative;min-height:100vh;
  display:flex;align-items:center;justify-content:center;
  text-align:center;padding:6rem 2rem 4rem;
  background:linear-gradient(175deg,#f6f3ee 0%,#efe8dd 50%,#e8dfd3 100%);
  overflow:hidden;
}
.hero-deco{position:absolute;border-radius:50%;opacity:.12;pointer-events:none}
.hero-deco-1{width:500px;height:500px;top:-120px;right:-100px;background:var(--accent)}
.hero-deco-2{width:300px;height:300px;bottom:60px;left:-80px;background:var(--wood)}
.hero-deco-3{width:180px;height:180px;top:40%;left:60%;background:var(--water)}
.hero-content{position:relative;z-index:1;max-width:600px}
.hero-tag{
  font-size:.78rem;letter-spacing:3px;color:var(--accent);
  text-transform:uppercase;margin-bottom:1.5rem;font-weight:500;
}
.hero h1{
  font-family:'Noto Serif KR',serif;
  font-size:3rem;font-weight:700;line-height:1.35;
  color:var(--text);margin-bottom:1.2rem;
}
.hero-desc{
  font-size:1rem;color:var(--text-sub);line-height:1.8;
  margin-bottom:2.5rem;font-weight:300;
}
.hero-btn{
  display:inline-block;
  background:var(--accent);color:#fff;
  padding:.85rem 2.2rem;border-radius:50px;
  text-decoration:none;font-size:.9rem;font-weight:500;
  transition:all .3s ease;letter-spacing:.5px;
}
.hero-btn:hover{background:var(--accent-dark);transform:translateY(-2px);box-shadow:var(--shadow-md)}
.hero-scroll{
  position:absolute;bottom:2rem;left:50%;transform:translateX(-50%);
  color:var(--text-light);animation:float 2.5s ease-in-out infinite;
}
@keyframes float{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(8px)}}

/* ── Section ── */
.section{padding:5rem 1.5rem}
.section-alt{background:var(--bg-alt)}
.section-inner{max-width:900px;margin:0 auto}
.section-label{
  font-size:.72rem;letter-spacing:3px;text-transform:uppercase;
  color:var(--accent);font-weight:600;margin-bottom:.6rem;
}
.section-label.center{text-align:center}
.section-title{
  font-family:'Noto Serif KR',serif;
  font-size:1.8rem;font-weight:700;text-align:center;
  margin-bottom:1rem;color:var(--text);
}
.section-subtitle{
  text-align:center;color:var(--text-sub);font-size:.9rem;
  font-weight:300;margin-bottom:2.5rem;line-height:1.7;
}

/* ── About ── */
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:center}
.about-text h2{
  font-family:'Noto Serif KR',serif;
  font-size:1.6rem;font-weight:700;line-height:1.5;margin-bottom:1.2rem;
}
.about-desc{font-size:.9rem;color:var(--text-sub);line-height:1.9;font-weight:300}
.about-visual{display:flex;flex-direction:column;gap:1rem}
.about-card{
  background:var(--card);border:1px solid var(--border);border-radius:var(--r);
  padding:1.5rem;text-align:center;transition:all .3s;
}
.about-card:hover{box-shadow:var(--shadow-md);transform:translateY(-3px)}
.about-card-icon{font-size:1.8rem;margin-bottom:.5rem;color:var(--accent)}
.about-card-label{font-size:.85rem;font-weight:600;margin-bottom:.3rem}
.about-card-desc{font-size:.78rem;color:var(--text-sub);letter-spacing:1px}

/* ── Features ── */
.features-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem;margin-top:1rem}
.feature-card{
  background:var(--card);border:1px solid var(--border);border-radius:var(--r);
  padding:1.8rem;transition:all .3s;
}
.feature-card:hover{box-shadow:var(--shadow-md);transform:translateY(-3px);border-color:var(--accent)}
.feature-num{
  font-size:.7rem;font-weight:700;color:var(--accent);
  letter-spacing:2px;margin-bottom:.8rem;
}
.feature-card h3{font-size:1rem;font-weight:600;margin-bottom:.5rem}
.feature-card p{font-size:.85rem;color:var(--text-sub);line-height:1.7;font-weight:300}

/* ── Steps ── */
.steps-grid{
  display:flex;align-items:flex-start;justify-content:center;gap:0;
  margin-top:1.5rem;
}
.step{text-align:center;flex:1;max-width:200px}
.step-circle{
  width:48px;height:48px;border-radius:50%;
  background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto .8rem;font-size:1.1rem;font-weight:700;
}
.step h4{font-size:.9rem;font-weight:600;margin-bottom:.3rem}
.step p{font-size:.8rem;color:var(--text-sub);font-weight:300}
.step-line{
  width:60px;height:1px;background:var(--border);
  margin-top:24px;flex-shrink:0;
}

/* ── Form ── */
.form-card{
  max-width:560px;margin:0 auto;
  background:var(--card);border:1px solid var(--border);
  border-radius:var(--r);padding:2rem;box-shadow:var(--shadow);
}
.form-row{display:flex;gap:1rem;margin-bottom:1.2rem}
.form-group{flex:1}
.form-group label{
  display:block;margin-bottom:.45rem;
  font-size:.8rem;font-weight:500;color:var(--text-sub);
}
.req{color:var(--accent)}
.opt{color:var(--text-light);font-weight:300}
input[type="date"],input[type="time"]{
  width:100%;padding:.7rem .85rem;
  border:1px solid var(--border);border-radius:var(--r-sm);
  background:var(--bg);color:var(--text);font-size:.9rem;
  font-family:inherit;transition:all .25s;
}
input[type="date"]:focus,input[type="time"]:focus{
  outline:none;border-color:var(--accent);background:#fff;
  box-shadow:0 0 0 3px rgba(192,139,92,.1);
}

/* Toggle */
.toggle-group{display:flex;gap:.5rem}
.toggle-item{
  flex:1;display:flex;align-items:center;justify-content:center;
  padding:.65rem;border:1px solid var(--border);border-radius:var(--r-sm);
  cursor:pointer;font-size:.88rem;color:var(--text-sub);
  background:var(--bg);transition:all .25s;
}
.toggle-item:hover{border-color:var(--text-light)}
.toggle-item input{display:none}
.toggle-item:has(input:checked){
  border-color:var(--accent);background:var(--accent-bg);
  color:var(--accent);font-weight:500;
}

/* Checkbox */
.check-label{
  display:flex;align-items:center;gap:.5rem;
  cursor:pointer;font-size:.85rem;color:var(--text-sub);
}
.check-label input{display:none}
.check-box{
  width:17px;height:17px;border:1.5px solid var(--text-light);
  border-radius:4px;transition:all .25s;position:relative;flex-shrink:0;
}
.check-label input:checked+.check-box{background:var(--accent);border-color:var(--accent)}
.check-label input:checked+.check-box::after{
  content:'';position:absolute;top:2px;left:5px;
  width:4px;height:8px;border:solid #fff;border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.leap-row{margin-bottom:.5rem}

/* Button */
.btn-primary{
  width:100%;padding:.85rem;
  background:var(--accent);color:#fff;border:none;
  border-radius:var(--r-sm);font-size:.92rem;font-weight:500;
  font-family:inherit;cursor:pointer;transition:all .25s;
  letter-spacing:.3px;
}
.btn-primary:hover{background:var(--accent-dark);box-shadow:var(--shadow-md)}
.btn-primary:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}

/* ── Results ── */
.result-area{max-width:560px;margin:2rem auto 0;animation:fadeUp .5s ease}
@keyframes fadeUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

.result-card{
  background:var(--card);border:1px solid var(--border);
  border-radius:var(--r);padding:1.8rem;margin-bottom:1rem;
  box-shadow:var(--shadow);
}
.result-card h2{
  font-family:'Noto Serif KR',serif;
  font-size:.9rem;font-weight:700;color:var(--text);
  margin-bottom:1.2rem;padding-bottom:.8rem;
  border-bottom:1px solid var(--border);
}

/* Date Info */
.date-info{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}
.date-item{
  text-align:center;padding:.8rem .5rem;
  background:var(--bg);border-radius:var(--r-sm);
}
.date-item .label{font-size:.7rem;color:var(--text-light);margin-bottom:.3rem;letter-spacing:.5px}
.date-item .value{font-size:1rem;font-weight:600;color:var(--text)}

/* Pillars */
.pillars-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.6rem}
.pillar{
  background:var(--bg);border-radius:var(--r-sm);
  padding:1.1rem .4rem;text-align:center;
  border:1px solid transparent;transition:all .3s;
}
.pillar:hover{border-color:var(--border);box-shadow:var(--shadow)}
.pillar-label{font-size:.65rem;color:var(--text-light);letter-spacing:1px;margin-bottom:.6rem}
.pillar-tengod{font-size:.7rem;color:var(--accent);margin-bottom:.35rem;min-height:.9rem;font-weight:500}
.pillar-hanja{
  font-family:'Noto Serif KR',serif;
  font-size:1.8rem;font-weight:400;line-height:1.35;
  margin-bottom:.2rem;color:var(--text);
}
.pillar-kr{font-size:.8rem;color:var(--text-sub);margin-bottom:.5rem}
.pillar-wuxing{display:flex;justify-content:center;gap:.2rem}
.wx-badge{
  display:inline-block;padding:.12rem .4rem;border-radius:4px;
  font-size:.65rem;font-weight:500;
}
.wx-木{background:var(--wood-bg);color:var(--wood)}
.wx-火{background:var(--fire-bg);color:var(--fire)}
.wx-土{background:var(--earth-bg);color:var(--earth)}
.wx-金{background:var(--metal-bg);color:var(--metal)}
.wx-水{background:var(--water-bg);color:var(--water)}

/* Wuxing Chart */
.wuxing-chart{display:grid;grid-template-columns:repeat(5,1fr);gap:.5rem;margin-bottom:1.2rem}
.wuxing-bar{text-align:center}
.wuxing-bar-label{font-size:.72rem;margin-bottom:.35rem;font-weight:500}
.wuxing-bar-track{
  height:72px;background:var(--bg);border-radius:6px;
  overflow:hidden;display:flex;align-items:flex-end;
}
.wuxing-bar-fill{
  width:100%;border-radius:6px;min-height:3px;opacity:.65;
  transition:height .8s cubic-bezier(.22,1,.36,1);
}
.wuxing-bar-count{font-size:.88rem;font-weight:600;margin-top:.35rem}

/* Analysis */
.analysis-section{margin-top:.5rem}
.analysis-item{
  padding:1rem 1.1rem;background:var(--bg);
  border-radius:var(--r-sm);margin-bottom:.5rem;
}
.analysis-item h4{font-size:.8rem;color:var(--accent);margin-bottom:.25rem;font-weight:600}
.analysis-item p{font-size:.83rem;color:var(--text-sub);line-height:1.7;font-weight:300}

.no-time-msg{text-align:center;color:var(--text-light);font-size:.78rem;padding:1rem 0;font-weight:300}
.error-msg{
  color:var(--fire);background:var(--fire-bg);
  border:1px solid rgba(212,107,94,.15);padding:1rem;
  border-radius:var(--r-sm);text-align:center;font-size:.88rem;
}

.hidden{display:none}

/* ── Footer ── */
.site-footer{
  background:var(--text);color:rgba(255,255,255,.6);
  padding:3rem 1.5rem 1.5rem;
}
.footer-top{
  display:flex;justify-content:space-between;align-items:flex-start;
  margin-bottom:2rem;
}
.footer-logo{
  font-family:'Noto Serif KR',serif;font-size:1.1rem;
  font-weight:700;color:#fff;margin-bottom:.4rem;
}
.footer-logo span{color:var(--accent)}
.footer-desc{font-size:.8rem;line-height:1.6}
.footer-links{display:flex;gap:1.5rem}
.footer-links a{color:rgba(255,255,255,.5);text-decoration:none;font-size:.82rem;transition:color .2s}
.footer-links a:hover{color:var(--accent)}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:1.2rem;font-size:.75rem;text-align:center;
}

/* ── Responsive ── */
@media(max-width:768px){
  .hero h1{font-size:2.2rem}
  .hero-desc{font-size:.9rem}
  .about-grid{grid-template-columns:1fr;gap:2rem}
  .features-grid{grid-template-columns:1fr}
  .steps-grid{flex-direction:column;align-items:center;gap:1rem}
  .step-line{width:1px;height:30px;margin:0}
  .footer-top{flex-direction:column;gap:1.5rem}
}
@media(max-width:600px){
  .nav-links{display:none}
  .hero{min-height:auto;padding:7rem 1.5rem 3rem}
  .hero h1{font-size:1.8rem}
  .section{padding:3.5rem 1.2rem}
  .form-row{flex-direction:column;gap:.8rem}
  .toggle-group{gap:.4rem}
  .pillars-grid{grid-template-columns:repeat(2,1fr)}
  .date-info{grid-template-columns:1fr}
  .form-card,.result-card{padding:1.4rem}
}
