/* ===========================================================
   Tyllia Journal — Landing site styles
   Theme: the logo gradient (cyan -> cream -> peach),
   premium black-on-pastel aesthetic.
   =========================================================== */

:root {
  /* Signature gradient stops (from the logo) */
  --cyan:  #C3E8DF;
  --cream: #EFE7BE;
  --peach: #F8CB9E;
  --grad: linear-gradient(135deg, #C3E8DF 0%, #EFE7BE 50%, #F8CB9E 100%);
  /* Deeper variant for text/numbers/icons that need contrast on light */
  --grad-deep: linear-gradient(135deg, #168E83 0%, #C9863C 100%);

  --ink: #16130F;        /* warm near-black, same as the mark */
  --muted: #6F685D;
  --bg: #FCFBF7;
  --bg-alt: #F6F1E6;
  --card: #FFFFFF;
  --border: #ECE5D7;
  --accent: #178B80;     /* deep teal — links & small accents */
  --accent-2: #C9863C;   /* amber */

  --shadow: 0 22px 48px -22px rgba(40, 30, 15, 0.30);
  --shadow-soft: 0 10px 30px -16px rgba(40, 30, 15, 0.22);
  --radius: 18px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Sora', 'Inter', sans-serif; line-height: 1.14; color: var(--ink); letter-spacing: -0.01em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; font-size: .74rem; color: var(--accent);
  background: rgba(23, 139, 128, .1); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.section-title { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 0 0 14px; }
.section-lead { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 auto 8px; }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-weight: 600; font-size: 1rem; padding: 14px 26px; border-radius: 999px;
  border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-soft); }
.btn--primary:hover { background: #000; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--border); }

/* ---------- Store badges ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: #fff;
  padding: 11px 20px; border-radius: 14px; transition: transform .15s ease, opacity .15s ease;
}
.store-badge:hover { text-decoration: none; transform: translateY(-2px); opacity: .9; }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .b-small { font-size: .68rem; opacity: .82; display: block; line-height: 1; }
.store-badge .b-big { font-size: 1.12rem; font-weight: 700; line-height: 1.2; }

/* ---------- Brand / logo ---------- */
.brand { display: flex; align-items: center; gap: 12px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; object-fit: contain; box-shadow: var(--shadow-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(252, 251, 247, .82);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink); font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-cta { padding: 10px 20px; }
/* Keep the primary CTA text white — overrides the nav-link color rule */
.nav-links a.btn--primary, .nav-links a.btn--primary:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 90px 0 76px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: 0; top: -180px; right: -160px;
  width: 620px; height: 620px; border-radius: 50%;
  background: var(--grad); filter: blur(20px); opacity: .55;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: 0 0 20px; }
.hero h1 .grad { background: var(--grad-deep); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 30px; max-width: 520px; }
.hero-actions { display: flex; flex-direction: column; gap: 18px; }

/* Phone mockup */
.phone {
  position: relative; width: 290px; height: 590px; margin: 0 auto;
  background: #fff; border-radius: 42px; padding: 14px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.phone::before {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 26px; background: var(--ink); border-radius: 0 0 16px 16px; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 30px; background: var(--grad);
  color: var(--ink); padding: 54px 22px 22px; display: flex; flex-direction: column; gap: 16px;
}
.phone-screen .ps-greet { font-family: 'Sora', sans-serif; font-size: 1.32rem; font-weight: 700; }
.phone-screen .ps-sub { opacity: .7; font-size: .92rem; margin-top: -8px; }
.ps-card { background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.7); border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 18px -12px rgba(40,30,15,.3); }
.ps-card strong { display: block; font-size: .95rem; }
.ps-card span { font-size: .82rem; color: var(--muted); }
.ps-moods { display: flex; gap: 10px; font-size: 1.6rem; }

/* ---------- Trust strip ---------- */
.trust { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: center; color: var(--muted); font-weight: 500; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--accent); }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad); margin-bottom: 18px;
}
.feature .ico svg { width: 26px; height: 26px; color: var(--ink); }
.feature h3 { font-size: 1.2rem; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.step { text-align: center; }
.step .num {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.3rem;
}
.step h3 { font-size: 1.1rem; margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad); color: var(--ink); border-radius: 28px; padding: 56px 40px; text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { color: var(--ink); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 12px; }
.cta-band p { color: rgba(22,19,15,.78); max-width: 560px; margin: 0 auto 26px; font-size: 1.08rem; }
.cta-band .stores { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d9d4ca; padding: 56px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer p { color: #aaa499; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 16px; }
.footer-col a { display: block; color: #d9d4ca; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .9rem; color: #9a958a; }

/* ---------- Legal / content pages ---------- */
.page-hero { position: relative; background: var(--grad); padding: 66px 0 44px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.page-hero .updated { color: rgba(22,19,15,.7); font-size: .95rem; }
.prose { max-width: 820px; margin: 0 auto; padding: 56px 24px 80px; }
.prose h2 { font-size: 1.4rem; margin: 36px 0 12px; }
.prose h3 { font-size: 1.12rem; margin: 24px 0 8px; }
.prose p, .prose li { color: #45413a; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.callout { background: #FBF3DF; border: 1px solid #EBD9A6; border-radius: 14px; padding: 18px 20px; margin: 24px 0; color: #6b5a23; }
.placeholder { background: #FBE5DD; color: #B2542F; padding: 1px 7px; border-radius: 6px; font-weight: 600; font-size: .92em; }

/* ---------- Contact / support cards ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 820px; margin: 40px auto 0; }
.info-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-soft); }
.info-card .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--grad); display:grid; place-items:center; margin-bottom: 16px; }
.info-card .ico svg { width: 24px; height: 24px; color: var(--ink); }
.info-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.info-card p { margin: 0 0 6px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 40px auto 0; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--card); margin-bottom: 14px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 20px 22px; font-size: 1.05rem; font-weight: 600; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit; }
.faq-q .chev { transition: transform .2s ease; flex: none; color: var(--accent); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 22px; color: var(--muted); }
.faq-item.open .faq-a { max-height: 320px; padding-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-actions { align-items: flex-start; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .section { padding: 64px 0; }
  .nav-links { position: fixed; inset: 74px 0 auto 0; background: var(--bg); flex-direction: column; gap: 0; padding: 12px 24px 24px; border-bottom: 1px solid var(--border); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-cta { width: 100%; justify-content: center; }
  .nav-toggle { display: block; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ===========================================================
   3D Phone Showcase — one large realistic device.
   True thickness from stacked depth slices; titanium frame;
   JS drives: --rx/--ry (mouse tilt), --gx/--gy (glare), carousel.
   =========================================================== */
.hero--3d { padding: 84px 0 40px; }
.hero--3d .hero-grid { grid-template-columns: 1fr .92fr; gap: 40px; }

.stage {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  perspective: 2200px; perspective-origin: 42% 38%;
  min-height: 760px; padding: 20px 0 50px;
}
.stage::before, .stage::after {
  content: ""; position: absolute; border-radius: 50%; z-index: -1;
  background: var(--grad); filter: blur(38px); opacity: .6;
}
.stage::before { width: 430px; height: 430px; top: 2%; right: 0; }
.stage::after  { width: 300px; height: 300px; bottom: 4%; left: -2%; opacity: .45; }

.dev { position: relative; --rx: 0deg; --ry: 0deg; animation: dev-float 7.5s ease-in-out infinite; }
@keyframes dev-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
.dev-tilt {
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .09s linear;
}

.phone3d {
  position: relative; transform-style: preserve-3d;
  width: 348px; aspect-ratio: 1293 / 2656;
  animation: sway 11s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: rotateY(-17deg) rotateX(4deg); }
  50%      { transform: rotateY(-4deg)  rotateX(1.5deg); }
}

/* Photoreal device frame (iPhone 15 Pro, natural titanium — transparent
   screen window; the bezel masks the screenshot corners automatically).
   Frame asset via the open-source MockUPhone device library. */
.p3d-frame-img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3;
  pointer-events: none; user-select: none;
  filter: drop-shadow(0 50px 60px rgba(22, 19, 15, .38));
}

/* The app screens sit behind the frame, inside the measured window */
.p3d-screen {
  position: absolute; overflow: hidden; background: #0c0b09; z-index: 1;
  left: 4.486%; top: 1.883%; width: 91.183%; height: 96.235%;
}
.p3d-screen img.scr {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity .9s ease, transform 1.5s ease;
}
.p3d-screen img.scr.active { opacity: 1; transform: scale(1); }

/* Glass glare that follows the cursor */
.p3d-glare {
  position: absolute; z-index: 4; pointer-events: none;
  left: 4.486%; top: 1.883%; width: 91.183%; height: 96.235%;
  border-radius: 14% / 6.4%;
  background: radial-gradient(480px 340px at var(--gx, 30%) var(--gy, 18%),
              rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .08) 36%, rgba(255, 255, 255, 0) 64%);
  mix-blend-mode: screen; transform: translateZ(2px);
}

/* Grounding shadow */
.dev-shadow {
  position: absolute; left: 50%; bottom: -58px; transform: translateX(-50%);
  width: 84%; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(22, 19, 15, .36) 0%, rgba(22, 19, 15, 0) 70%);
  filter: blur(7px);
}

@media (max-width: 1060px) {
  .stage { min-height: 660px; }
  .phone3d { width: 300px; }
}
@media (max-width: 920px) {
  .hero--3d .hero-grid { grid-template-columns: 1fr; }
  .stage { margin-top: 10px; min-height: 700px; }
}
@media (max-width: 640px) {
  .stage { min-height: 600px; padding-bottom: 70px; }
  .phone3d { width: 264px; }
}
@media (prefers-reduced-motion: reduce) {
  .dev { animation: none; }
  .phone3d { animation: none; transform: rotateY(-12deg) rotateX(3deg); }
  .dev-tilt { transition: none; }
}

/* ===========================================================
   Contact form
   =========================================================== */
.form-card {
  max-width: 640px; margin: 40px auto 0; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow-soft);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--bg); font-family: inherit; font-size: 1rem; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,139,128,.14);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-status { display: none; margin-top: 18px; padding: 14px 18px; border-radius: 12px; font-weight: 500; }
.form-status.ok   { display: block; background: #E6F4EF; color: #14695f; border: 1px solid #BFE3D8; }
.form-status.err  { display: block; background: #FBE5DD; color: #B2542F; border: 1px solid #F2C7B5; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } .form-card { padding: 26px 20px; } }
