
:root {
  --bg: #17192f;
  --bg-deep: #101529;
  --panel: #252740;
  --ink: #faf5ee;
  --muted: #c9c3d0;
  --line: #ffffff2b;
  --cream: #f4dcb3;
  --lavender: #ceb9ec;
  --display: "Iowan Old Style", Baskerville, Georgia, serif;
  --body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 98px; overflow-x: clip; }
body { margin: 0; min-width: 320px; overflow-x: clip; background: var(--bg); color: var(--ink); font-family: var(--body); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--lavender); color: var(--bg); }
:focus-visible { outline: 3px solid var(--cream) !important; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; }

.eyebrow { color: var(--cream); font-size: 10px; font-weight: 750; letter-spacing: .19em; text-transform: uppercase; }
.primary-button, .outline-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 47px; padding: 12px 21px; border-radius: 100px; border: 1px solid transparent;
  font-weight: 750; font-size: .89rem; transition: transform .2s, background .2s, box-shadow .2s;
}
.primary-button { background: var(--cream); color: #322a41; box-shadow: 0 9px 28px #0c0f2791; }
.primary-button:not(:disabled):hover { background: #ffe8c0; transform: translateY(-3px); }
.outline-button { background: #ffffff0c; border-color: #ffffff4d; color: var(--ink); }
.outline-button:hover { background: #ffffff1d; transform: translateY(-2px); }

.floating-nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1080px, calc(100% - 34px)); padding: 10px 17px 10px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid #ffffff37; border-radius: 100px; background: #24253cdb;
  box-shadow: 0 15px 45px #080a205e; backdrop-filter: blur(20px);
}
.nav-brand { display: flex; gap: 8px; align-items: center; white-space: nowrap; font-family: var(--display); font-size: 21px; }
.nav-links { display: flex; align-items: center; gap: 5px; }
.nav-links a { padding: 9px 13px; border-radius: 50px; color: #e8e2ed; font-size: 12px; }
.nav-links a:hover { background: #ffffff1c; }
.nav-toggle { display: none; border: 0; background: none; color: var(--ink); padding: 7px; }

.hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100svh;
  max-width: 1500px; margin: auto; padding: 145px max(6vw, 24px) 95px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); align-items: center;
  background: radial-gradient(ellipse at 20% 45%, #77648b36, transparent 55%);
}
.hero-content { position: relative; z-index: 2; }
.hero-content .eyebrow { display: flex; align-items: center; gap: 10px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c6d9c6; box-shadow: 0 0 12px #c6d9c6; }
.hero h1 { max-width: 800px; margin: 24px 0 26px; font-size: clamp(4.5rem, 7.4vw, 8.1rem); line-height: .95; letter-spacing: -.073em; }
.hero h1 em { color: var(--cream); font-style: normal; }
.title-moon { display: inline-block; vertical-align: top; margin: 5px 0 0 12px; font-size: .34em; letter-spacing: 0; }
.hero-content > p { max-width: 560px; margin-bottom: 32px; color: var(--muted); font-family: var(--display); font-size: clamp(1.5rem, 2.8vw, 2.35rem); line-height: 1.25; }
.hero-button { min-width: 150px; min-height: 54px; }
.hero-content > small { display: block; margin-top: 16px; color: var(--muted); font-size: .8rem; }
.hero-moon { position: relative; width: min(34vw, 440px); aspect-ratio: 1; justify-self: center; filter: drop-shadow(0 18px 65px #d9b6db46); }
.moon-disc { position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff7df 2%, #f0d8bb 49%, #baa7c8 100%); box-shadow: inset -26px -24px 49px #65619965, 0 0 55px #e6cebba8, 0 0 120px #c8a5df5c; }
.moon-disc::after { content: ""; position: absolute; width: 15%; height: 15%; top: 47%; left: 25%; border-radius: 50%; background: #9e899b2b; box-shadow: 89px -57px 0 -5px #9e899b2b, 112px 49px 0 -3px #9e899b25; }
.moon-orbit { position: absolute; inset: 0; border: 1px solid #e8d8dd55; border-radius: 50%; transform: rotate(-26deg) scaleY(.62); }
.moon-orbit::after { content: "✦"; position: absolute; right: 6%; top: 31%; color: var(--cream); font-size: 23px; }
.moon-orbit-two { inset: 5%; border-color: #e8d8dd27; transform: rotate(45deg) scaleY(.8); }
.moon-orbit-two::after { right: 86%; top: 60%; font-size: 13px; }
.hero-stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-stars span { position: absolute; color: #f2e5d6b4; font-size: 9px; animation: twinkle 4s ease-in-out infinite; }
.hero-bottom { position: absolute; bottom: 28px; left: max(6vw, 24px); right: max(6vw, 24px); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; letter-spacing: .17em; }

.content-wrap { width: min(990px, calc(100% - 40px)); margin: auto; }
.cozy-section { padding: 110px 0; border-bottom: 1px solid var(--line); }
.section-intro { margin-bottom: 26px; }
.section-intro h2 { margin: 12px 0 0; font-size: clamp(2.45rem, 5vw, 4.9rem); line-height: 1.06; letter-spacing: -.055em; }
.section-subtitle { color: var(--muted); margin-bottom: 27px; font-size: 1.05rem; }

.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mood-button { display: flex; align-items: center; gap: 11px; min-height: 83px; padding: 18px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: #ffffff0b; color: var(--ink); font-weight: 650; transition: transform .2s, border-color .2s, background .2s; }
.mood-button span { font-size: 29px; }
.mood-button:hover, .mood-button.selected { transform: translateY(-3px); border-color: #d8bdeea1; background: #ccb7e624; }
.mood-note { display: flex; align-items: center; min-height: 96px; margin-top: 15px; padding: 18px 25px; border-left: 3px solid var(--lavender); border-radius: 4px 18px 18px 4px; background: linear-gradient(90deg, #c9b4ed20, #f4c2b411); font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.35; }

.feelings-card { max-width: 780px; padding: clamp(22px, 4vw, 42px); border: 1px solid #e6d1e250; border-radius: 25px; background: linear-gradient(145deg, #47405d9c, #292b4799); box-shadow: 0 24px 70px #090c2454; }
.feelings-card > label:first-child { display: block; margin-bottom: 13px; color: #f4e4df; font-size: .9rem; font-weight: 700; }
.feelings-card textarea { display: block; width: 100%; min-height: 155px; resize: vertical; padding: 18px; border: 1px solid #ffffff56; border-radius: 14px; outline: none; background: #15182bad; color: var(--ink); line-height: 1.6; }
.feelings-card textarea::placeholder { color: #b8b2c0; }
.feelings-card textarea:focus { border-color: var(--cream); }
.form-under { display: flex; justify-content: space-between; gap: 12px; margin: 9px 0 23px; color: #c9c4d0; font-size: .72rem; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent-row { display: flex; align-items: flex-start; gap: 12px; max-width: 620px; margin-bottom: 23px; color: #eee8ed; font-size: .86rem; line-height: 1.55; cursor: pointer; }
.consent-row input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--cream); }
.form-success, .form-error { margin: 17px 0 0; font-size: .87rem; }
.form-success { color: #d4ead4; }
.form-error { color: #ffd0c8; }

.smile-card { max-width: 760px; display: grid; gap: 22px; justify-items: start; padding: clamp(25px, 5vw, 50px); border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(135deg, #ffffff12, #ffffff06); }
.smile-symbol { display: grid; place-items: center; width: 55px; height: 55px; border: 1px solid #d6bded7a; border-radius: 16px; background: #cab3db27; color: var(--cream); font-size: 31px; }
.smile-card p { min-height: 75px; margin: 0; font-family: var(--display); font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.25; }
.bubble-details { max-width: 760px; margin-top: 15px; border: 1px solid var(--line); border-radius: 17px; background: #ffffff09; overflow: hidden; }
.bubble-details summary { list-style: none; display: flex; justify-content: space-between; padding: 19px 23px; cursor: pointer; font-size: .9rem; font-weight: 700; }
.bubble-details summary::-webkit-details-marker { display: none; }
.bubble-details summary span { color: var(--cream); }
.bubble-field { position: relative; height: 260px; overflow: hidden; margin: 0 16px; border: 1px solid var(--line); border-radius: 15px; background: radial-gradient(circle at 50% 35%, #6e6f9b61, transparent 55%), #272e4d; touch-action: manipulation; }
.bubble { position: absolute; border: 1px solid #ffffffa6; border-radius: 50%; background: radial-gradient(circle at 27% 23%, #ffffffa3, transparent 25%), radial-gradient(circle at 65% 70%, #e4b5d455, #a6bce344); box-shadow: inset -5px -6px 12px #ffffff2a, 0 7px 18px #0a0b2866; animation: float 3s ease-in-out infinite alternate; }
.bubble:nth-child(2n) { animation-delay: -1s; }
.bubble.popped { animation: pop .22s ease forwards; }
.bubble-score { padding: 12px 22px 17px; margin: 0; color: var(--muted); font-size: .78rem; }

.breathing-card { max-width: 760px; min-height: 470px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px; text-align: center; border: 1px solid var(--line); border-radius: 27px; background: radial-gradient(circle at 50% 41%, #a9a4d543, transparent 45%), linear-gradient(145deg, #333653, #222b46); }
.breath-orb { display: grid; place-items: center; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #f9e8e0, #b8b4dc 46%, #718ba8 85%); box-shadow: 0 0 55px #b8a9db8c, 0 0 110px #8c91c146, inset -23px -21px 40px #536b8e8c; color: white; font-size: 32px; }
.breath-orb.active { animation: breathe 10s ease-in-out infinite; }
.breathing-card p { min-height: 39px; margin: 24px 0 16px; font-family: var(--display); font-size: clamp(1.35rem, 3vw, 1.8rem); }
.minute-track { width: min(310px, 100%); height: 5px; margin-top: 28px; overflow: hidden; border-radius: 30px; background: #ffffff30; }
.minute-track span { display: block; height: 100%; background: var(--cream); transition: width 1s linear; }
.breathing-card small { margin-top: 10px; color: var(--muted); }

.sky-section { background: radial-gradient(circle at 50% 48%, #455575, #1b2642 54%, #11172e); color: #fbf6ee; }
.sky-inner { max-width: 990px; min-height: 690px; margin: auto; padding: 100px 20px 50px; text-align: center; }
.sky-inner h2 { margin: 11px 0; font-size: clamp(2.8rem, 6vw, 5.8rem); letter-spacing: -.06em; }
.sky-field { position: relative; height: 390px; }
.sky-star { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; color: #f5dfb5; text-shadow: 0 0 14px #f7dca3, 0 0 30px #f7dca388; padding: 10px; animation: twinkle 3s ease-in-out infinite alternate; }
.sky-star:nth-child(2n) { animation-delay: -1.3s; }
.sky-star:hover { color: white; transform: translate(-50%, -50%) scale(1.3); }
.sky-moon { position: absolute; top: 14%; right: 16%; color: #f6e1bc; font-size: 90px; text-shadow: 0 0 40px #f5ddc1; pointer-events: none; }
.sky-note { min-height: 65px; margin: 0; color: #f5e5cd; font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.9rem); }
.final-note { padding: 100px 20px 25px; background: radial-gradient(circle at 50% 12%, #6b58744d, transparent 55%), var(--bg-deep); }
.letter { max-width: 730px; margin: auto; padding: clamp(28px, 6vw, 70px); border: 1px solid var(--line); border-radius: 25px; background: #ffffff0d; }
.letter h2 { margin: 16px 0 25px; font-size: clamp(3rem, 6vw, 5.5rem); letter-spacing: -.06em; }
.letter p { color: #ebe3eb; font-family: var(--display); font-size: clamp(1.17rem, 2.1vw, 1.5rem); line-height: 1.6; }
.letter .outline-button { margin-top: 16px; }
.final-note > small { display: block; max-width: 990px; margin: 55px auto 0; padding: 22px 0 0; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .7rem; }

.dashboard-shell { min-height: 100svh; padding: 90px 20px; background: radial-gradient(circle at 50% 0, #56516e55, transparent 45%), var(--bg); }
.dashboard-content { max-width: 920px; margin: auto; }
.dashboard-card { max-width: 600px; margin: auto; padding: clamp(27px, 5vw, 45px); border: 1px solid var(--line); border-radius: 23px; background: #ffffff0f; }
.dashboard-card h1, .dashboard-header h1 { margin: 13px 0; font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -.05em; }
.dashboard-card p, .dashboard-header p { color: var(--muted); line-height: 1.5; }
.dashboard-card form { display: grid; gap: 10px; margin-top: 26px; }
.dashboard-card form label { font-size: .85rem; font-weight: 700; }
.dashboard-card form input { width: 100%; padding: 13px; border: 1px solid #ffffff55; border-radius: 11px; background: #101529; color: var(--ink); }
.dashboard-card form .primary-button { justify-self: start; margin-top: 9px; }
.dashboard-back { display: inline-block; margin-bottom: 28px; color: var(--cream); font-size: .85rem; }
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.dashboard-header .outline-button { margin-top: 10px; }
.note-list { display: grid; gap: 13px; }
.saved-note { padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: #ffffff0c; }
.saved-note time { color: var(--cream); font-size: .75rem; letter-spacing: .07em; }
.saved-note p { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.empty-notes { max-width: none; color: var(--muted); }
.dashboard-pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 25px 0; color: var(--muted); font-size: .85rem; }
.dashboard-pagination a { color: var(--cream); }
.dashboard-pagination span { margin: 0 auto; }
.dashboard-card code { color: var(--cream); overflow-wrap: anywhere; }

@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes float { to { transform: translateY(-13px); } }
@keyframes pop { to { transform: scale(1.6); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(.85); } 40%, 60% { transform: scale(1.12); } }

@media (max-width: 760px) {
  .floating-nav { top: 14px; padding: 9px 14px; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { position: absolute; top: calc(100% + 8px); left: 0; right: 0; display: none; padding: 9px; border: 1px solid #ffffff40; border-radius: 20px; background: #24253cf5; box-shadow: 0 20px 40px #090b26a6; }
  .nav-links.open { display: grid; grid-template-columns: repeat(2, 1fr); }
  .nav-links a { padding: 11px; }
  .hero { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 680px; padding: 115px 23px 85px; }
  .hero h1 { font-size: clamp(4rem, 12vw, 6.5rem); }
  .hero-moon { position: absolute; top: 70px; right: -30px; width: 260px; opacity: .25; z-index: -1; }
  .hero-bottom { left: 23px; right: 23px; }
  .content-wrap { width: min(620px, calc(100% - 30px)); }
  .cozy-section { padding: 77px 0; }
  .mood-grid { grid-template-columns: repeat(2, 1fr); }
  .sky-inner { min-height: 630px; padding-top: 80px; }
  .sky-field { height: 360px; }
}

@media (max-width: 430px) {
  .hero { min-height: 690px; }
  .hero h1 { font-size: clamp(3.6rem, 15vw, 5.2rem); }
  .hero-content > p { max-width: 300px; }
  .hero-moon { right: -45px; width: 200px; opacity: .18; }
  .hero-bottom { font-size: 8px; }
  .section-intro h2 { font-size: clamp(2.3rem, 11vw, 3.5rem); }
  .mood-button { min-height: 77px; padding: 12px; font-size: .8rem; }
  .mood-button span { font-size: 25px; }
  .feelings-card { padding: 19px; }
  .consent-row { font-size: .8rem; }
  .sky-moon { font-size: 65px; }
  .dashboard-header { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
