/* PSILY — brand styles
   Palette taken from the original PSILY documents:
   deep teal  #0C3B3F / #0C4040
   accent     #24A2AE
*/

:root {
  --ink: #0c3b3f;
  --ink-2: #0c4040;
  --teal: #24a2ae;
  --teal-dark: #1b8792;
  --cream: #f6f4ef;
  --paper: #ffffff;
  --muted: #5b6b6c;
  --line: #e3e1da;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 59, 63, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.container {
  width: min(1080px, 92vw);
  margin-inline: auto;
}

h1, h2, h3 { line-height: 1.2; color: var(--ink); }

a { color: var(--teal-dark); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.brand-mark { color: var(--teal); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 500;
}
.nav-links a:hover { color: var(--teal-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 8px 16px; font-size: 0.92rem; }
.btn-large { padding: 15px 30px; font-size: 1.05rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--cream); color: var(--ink); }
.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover { color: #b23b3b; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--cream), #ffffff 70%);
  padding: 90px 0 80px;
}
.hero-inner { max-width: 720px; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 20px;
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--cream); }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 40px;
  text-align: center;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; color: var(--teal-dark); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.feature {
  padding: 24px;
  border-left: 3px solid var(--teal);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.feature h3 { margin-top: 0; }
.feature p { margin-bottom: 0; color: var(--muted); }

/* ---------- Dark strip ---------- */
.section-dark {
  background: var(--ink);
  color: #eaf3f3;
}
.section-dark h2 { color: #fff; }
.privacy-strip { max-width: 720px; text-align: center; }
.privacy-strip p { color: #b9d2d3; font-size: 1.1rem; }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta-inner p { color: var(--muted); margin-bottom: 26px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  background: var(--cream);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
}
.footer-note { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  padding: 40px 0;
  background: linear-gradient(160deg, var(--cream), #fff 70%);
}
.auth-card {
  width: min(440px, 92vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}
.auth-card h1 { font-size: 1.6rem; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(36, 162, 174, 0.15);
}
.auth-card .btn { width: 100%; text-align: center; }
.auth-alt { text-align: center; margin: 18px 0 0; color: var(--muted); font-size: 0.95rem; }
.note {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Dashboard ---------- */
.dash-wrap { padding: 40px 0 80px; min-height: calc(100vh - 74px); }
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.dash-head h1 { font-size: 1.8rem; margin: 0 0 4px; }
.dash-list { display: grid; gap: 16px; margin-bottom: 44px; }
.empty { color: var(--muted); }
.msg {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.msg-kind {
  text-transform: capitalize;
  background: var(--teal);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.msg-meta { color: var(--muted); font-size: 0.9rem; }
.msg-body { margin: 0 0 10px; white-space: pre-wrap; }
.msg-del { margin: 0; }
.msg-actions { display: flex; gap: 16px; align-items: center; }
.msg-actions form { margin: 0; }
.dash-form {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
}
.dash-form h2 { margin-top: 0; }
.dash-form .btn { width: 100%; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.head-actions { display: flex; gap: 10px; align-items: center; }

/* Panels (status, buddies) */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.panel h2 { margin: 0 0 6px; font-size: 1.2rem; }
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.status {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  vertical-align: middle;
}
.st-active { background: #e3f4f1; color: #12796b; }
.st-overdue { background: #fdeede; color: #b6641a; }
.st-activated { background: #eae7f7; color: #5b4bb0; }
.st-activated-pill { color: #5b4bb0 !important; font-weight: 700; }

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.inline-form input[type="text"],
.inline-form input[type="email"] { flex: 1 1 180px; }
.inline-form input[type="number"] { width: 80px; }
.inline-form input {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}
.inline-form label { font-weight: 600; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 12px 0; }
.count { color: var(--muted); font-size: 0.9rem; font-weight: 500; }

.buddies { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 8px; }
.buddy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--cream);
  border-radius: 10px;
}
.buddy form { margin: 0; }

/* Attachment & gift lines on messages */
.msg-attach, .msg-gift { margin: 6px 0 10px; font-size: 0.92rem; }
.msg-gift { color: #5b4bb0; }

/* Gift shop */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.shop-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.shop-emoji { font-size: 2.4rem; margin-bottom: 8px; }
.shop-card h3 { margin: 0 0 8px; }
.shop-card p { color: var(--muted); flex: 1; margin: 0 0 16px; }
.shop-card .btn { align-self: flex-start; }
.shop-price { color: var(--teal-dark); font-weight: 700; font-size: 0.95rem; }

@media (max-width: 640px) {
  .nav-links { gap: 14px; font-size: 0.9rem; }
  .nav-links li:not(:last-child):not(:nth-last-child(2)) { display: none; }
  .hero { padding: 60px 0 50px; }
  .row { grid-template-columns: 1fr; }
}
