/* ==========================================================================
   Alleviate.AI — Design System + Site Styles
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Colours */
  --bg:            #FBF3EC;   /* warm cream page background */
  --bg-card:       #FFFFFF;   /* card surfaces */
  --bg-soft:       #FDF6EF;   /* soft section band */
  --bg-peach:      #F6E5D8;   /* peachy accent surface */
  --accent:        #C97B5A;   /* terracotta (primary) */
  --accent-2:      #D9946F;   /* lighter coral */
  --accent-soft:   #F3D9C9;   /* soft coral tint (icon tiles) */
  --accent-ring:   #EFC9B4;
  --text:          #3D3229;   /* dark brown */
  --text-soft:     #6E6259;   /* muted brown */
  --text-faint:    #9A8E84;
  --line:          #EADBCE;   /* hairline borders */
  --white:         #FFFFFF;

  /* Typography */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radii + shadows */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(61, 50, 41, 0.06);
  --shadow-md: 0 10px 30px rgba(61, 50, 41, 0.08);
  --shadow-lg: 0 24px 60px rgba(61, 50, 41, 0.12);

  /* Layout */
  --maxw: 1120px;
  --gutter: 24px;
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- Typography ---------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.12; margin: 0; color: var(--text); }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }
.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 14px;
}
.text-accent { color: var(--accent); }
.lead { font-size: 1.06rem; color: var(--text-soft); }
.muted { color: var(--text-soft); }

/* ---- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.center { text-align: center; }
.grid { display: grid; gap: 28px; }
.stack-sm > * + * { margin-top: 10px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #b96b4c; box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
/* Greyed-out / disabled button (e.g. Download App until store release) */
.btn--disabled,
.btn--disabled:hover,
.btn--disabled:active {
  background: #cfc6bd;
  color: rgba(255,255,255,.85);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
  text-decoration: none;
}
.btn--light { background: #fff; color: var(--accent); }
.btn--light:hover { box-shadow: var(--shadow-md); }
.btn--block { width: 100%; justify-content: center; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 243, 236, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); font-size: 1.35rem; letter-spacing: 0.18em; font-weight: 600; }
.brand__mark { width: 40px; height: 40px; flex: none; object-fit: contain; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: 0.95rem; color: var(--text-soft); font-weight: 500; position: relative; padding: 6px 0; }
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--accent); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__toggle { display: none; background: none; border: none; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(251,243,236,0.96) 0%, rgba(251,243,236,0.70) 34%, rgba(251,243,236,0.15) 62%, rgba(251,243,236,0) 100%),
    url("../assets/hero-bg.png");
  background-size: cover, cover;
  background-position: center, center right;
  background-repeat: no-repeat;
}
/* Fallback tint if the image is missing */
.hero { background: linear-gradient(180deg, #FBF3EC 0%, #F7E8DC 100%); }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px; padding: 64px 0 88px; }
.hero h1 { margin: 6px 0 22px; }
.hero .lead { max-width: 34ch; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero__social { display: flex; align-items: center; gap: 14px; color: var(--text-soft); font-size: 0.9rem; }
.avatars { display: flex; }
.avatars span {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--bg);
  margin-left: -10px; background: var(--accent-soft);
  display: grid; place-items: center; font-size: 0.9rem;
}
.avatars span:first-child { margin-left: 0; }

/* ---- Real phone image ---- */
.hero__visual { display: flex; justify-content: center; }
.hero__phone-img {
  width: 320px; max-width: 82vw; height: auto;
  filter: drop-shadow(0 30px 60px rgba(61,50,41,.22));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero__phone-img { animation: none; } }

/* ---- Phone mockup (CSS placeholder — kept as fallback) ---- */
.phone {
  width: 300px; max-width: 78vw;
  border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #2a2320, #4a3f38);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone::before {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 26px; background: #201a17; border-radius: 0 0 16px 16px; z-index: 3;
}
.phone__screen {
  border-radius: 32px; overflow: hidden; background: linear-gradient(180deg, #FDEFE4, #F8E3D3);
  padding: 40px 16px 14px; min-height: 560px; position: relative;
}
.phone__greeting { font-family: var(--font-serif); font-size: 1.3rem; }
.phone__sub { font-size: 0.8rem; color: var(--text-soft); margin: 2px 0 14px; }
.phone__scene {
  height: 150px; border-radius: 18px; margin-bottom: 12px;
  background: linear-gradient(180deg, #F3C9A9, #E9A98a);
  display: grid; place-items: center; color: rgba(255,255,255,.85); font-size: .8rem;
}
.phone__card {
  background: #fff; border-radius: 16px; padding: 12px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.phone__card .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); flex: none; }
.phone__card .title { font-weight: 600; font-size: .85rem; }
.phone__card .meta { font-size: .72rem; color: var(--text-soft); }
.phone__card .play { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color:#fff; display:grid; place-items:center; }
.phone__label { font-size: .72rem; color: var(--text-soft); margin: 4px 0 10px; }
.phone__quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.phone__quick div { background: #fff; border-radius: 12px; padding: 12px 4px; text-align: center; font-size: .62rem; color: var(--text-soft); box-shadow: var(--shadow-sm); }
.phone__quick div i { display:block; font-size: 1rem; margin-bottom: 4px; }
.phone__tabbar { position: absolute; left: 16px; right: 16px; bottom: 14px; background:#fff; border-radius: 16px; padding: 8px; display:flex; justify-content: space-around; font-size:.6rem; color: var(--text-faint); box-shadow: var(--shadow-sm); }
.phone__tabbar span:first-child { color: var(--accent); }

/* ==========================================================================
   Cards & feature grids
   ========================================================================== */
.panel { background: var(--bg-soft); border-radius: var(--r-xl); padding: 56px 44px; box-shadow: var(--shadow-sm); }

.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.audience__item { display: flex; gap: 16px; align-items: flex-start; padding: 8px 16px; position: relative; }
.audience__item + .audience__item::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line);
}
.icon-tile { width: 58px; height: 58px; flex: none; border-radius: var(--r-md); background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.icon-tile svg { width: 28px; height: 28px; }
.audience__item h3 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 700; margin-bottom: 4px; }
.audience__item p { font-size: 0.9rem; color: var(--text-soft); margin: 0; }

/* Tools split section */
.tools { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 48px; align-items: center; }
.tools__intro .btn { margin-top: 10px; }
.tools__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tool {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px 10px; text-align: center; transition: transform .18s ease, box-shadow .2s ease, border-color .2s;
}
.tool:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-ring); }
.tool__icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--accent); display: grid; place-items: center; }
.tool__icon svg { width: 30px; height: 30px; }
.tool span { font-size: 0.8rem; color: var(--text-soft); font-weight: 500; }
.tools__meta { grid-column: 1 / -1; display: flex; gap: 28px; justify-content: center; margin-top: 22px; color: var(--text-soft); font-size: .88rem; }
.tools__meta span { display: inline-flex; align-items: center; gap: 8px; }

/* Companion section */
.companion { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; background: var(--bg-peach); border-radius: var(--r-xl); padding: 48px; overflow: hidden; }
.companion__chat { position: relative; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.companion__img { width: 100%; max-width: 340px; height: auto; border-radius: var(--r-lg); display: block; }
.chat-illus { width: 150px; height: 220px; border-radius: 90px 90px 20px 20px; background: linear-gradient(180deg,#E8A98C,#D98a6a); position: relative; }
.chat-illus::after { content:""; position:absolute; top:26px; left:50%; transform:translateX(-50%); width:66px; height:66px; border-radius:50%; background:#f0c3a8; }
.bubbles { position: absolute; right: -8px; top: 20px; width: 62%; display: grid; gap: 10px; z-index: 2; }
.bubble { background: #fff; border-radius: 16px; padding: 10px 14px; font-size: 0.82rem; box-shadow: var(--shadow-sm); }
.bubble--me { background: var(--accent-soft); justify-self: end; }
.companion h2 { margin-bottom: 16px; }

/* ==========================================================================
   CTA banner + generic page hero
   ========================================================================== */
.cta {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; border-radius: var(--r-xl); padding: 44px 48px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
}
.cta h2 { color: #fff; font-size: 1.9rem; }
.cta p { color: rgba(255,255,255,.9); margin: 6px 0 0; }
.cta__badges { display: flex; gap: 14px; flex-wrap: wrap; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; background: #1c1613; color: #fff; padding: 10px 18px; border-radius: 12px; }
.store-badge small { display: block; font-size: .6rem; opacity: .8; line-height: 1; }
.store-badge strong { font-size: .95rem; font-weight: 600; }

.pagehero { background: linear-gradient(180deg,#FBF3EC, #F7E8DC); padding: 72px 0 56px; text-align: center; }
.pagehero .eyebrow { justify-content: center; }
.pagehero p { max-width: 56ch; margin: 16px auto 0; color: var(--text-soft); font-size: 1.05rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 64px 0 28px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 32px; }
.footer__about p { font-size: 0.88rem; color: var(--text-soft); max-width: 30ch; margin: 14px 0 18px; }
.footer h4 { font-family: var(--font-sans); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 16px; }
.footer li { margin-bottom: 10px; }
.footer li a { font-size: 0.9rem; color: var(--text-soft); }
.footer li a:hover { color: var(--accent); }
.footer__form { display: flex; gap: 8px; margin-top: 8px; }
.footer__form input { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: var(--r-pill); padding: 12px 16px; font-family: inherit; font-size: .9rem; }
.footer__form input:focus { outline: none; border-color: var(--accent); }
.footer__form button { width: 46px; height: 46px; flex: none; border: none; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.1rem; }
.footer__socials { display: flex; gap: 14px; margin-top: 16px; }
.footer__socials a { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-soft); }
.footer__socials a:hover { color: var(--accent); border-color: var(--accent); }
.footer__bottom { text-align: center; color: var(--text-faint); font-size: 0.82rem; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.site-version { margin-left: 8px; white-space: nowrap; }
.form-note { font-size: .8rem; margin-top: 8px; min-height: 1em; }
.form-note.ok { color: #4a8a5c; }
.form-note.err { color: #b5583f; }

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .18s, box-shadow .2s; }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post__thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--accent-soft), var(--accent-2)); display: grid; place-items: center; color: rgba(255,255,255,.85); }
.post__body { padding: 22px; }
.post__tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 600; }
.post h3 { font-size: 1.15rem; margin: 8px 0 10px; }
.post p { font-size: .9rem; color: var(--text-soft); margin-bottom: 14px; }
.post__meta { font-size: .8rem; color: var(--text-faint); }

/* Features page detail rows */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-row:nth-child(even) .feature-row__media { order: -1; }
.feature-row__media { aspect-ratio: 4/3; border-radius: var(--r-xl); background: linear-gradient(135deg, var(--accent-soft), var(--bg-peach)); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.feature-row__media .icon-tile { width: 84px; height: 84px; }
.feature-row + .feature-row { margin-top: 64px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; color: var(--text-soft); font-size: .95rem; }
.feature-list li::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* Org / value grids */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 26px; }
.value-card .icon-tile { margin-bottom: 16px; }
.value-card h3 { font-family: var(--font-sans); font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.value-card p { font-size: .92rem; color: var(--text-soft); margin: 0; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--font-serif); font-size: 2.8rem; color: var(--accent); }
.stat .label { color: var(--text-soft); font-size: .95rem; }

/* Contact form */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 40px; max-width: 620px; margin: 0 auto; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; font-family: inherit; font-size: .95rem; background: var(--bg-soft);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .hero__visual { order: -1; }
  .tools { grid-template-columns: 1fr; }
  .tools__grid { grid-template-columns: repeat(4, 1fr); }
  .companion { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-row__media { order: 0; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta .btn--ghost { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; position: absolute; top: 74px; left: 0; right: 0;
    background: var(--bg); padding: 20px var(--gutter); gap: 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .audience, .value-grid, .stat-row, .blog-grid, .tools__grid { grid-template-columns: 1fr; }
  .audience__item + .audience__item::before { display: none; }
  .cta { grid-template-columns: 1fr; text-align: center; }
  .cta__badges { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; }
  .panel { padding: 36px 22px; }
  .companion, .cta { padding: 32px 24px; }
  .section { padding: 60px 0; }
}
