/* TalePerks — static iOS landing page
   Design source: /tmp/tp/web-design (desktop.svg / mobile.svg)
   App screens are real screenshots: img/screen-dramas.jpg / img/screen-novel.jpg (546×1183)
   Breakpoints: >=1024 two columns, <=1023 one column (390 verified) */

:root{
  --sunrise:#FFA63D;
  --coral:#FF6A4A;
  --rose:#FF2A5A;
  --ink:#1B1B1F;
  --slate:#6B6B75;
  --warm-white:#FFF7F3;
  --footer:#2F2F2F;
  --grad:linear-gradient(135deg,#FFA63D 0%,#FF6A4A 52%,#FF2A5A 100%);
  --grad-h:linear-gradient(90deg,#FFA63D 0%,#FF6A4A 52%,#FF2A5A 100%);
  /* Text-safe version of the brand gradient: every stop >= 3.8:1 on #FFF7F3
     (WCAG AA large text needs 3:1; the decorative --grad-h stays for the footer strip). */
  --grad-h-ink:linear-gradient(90deg,#D9541A 0%,#DD3A24 52%,#C90F45 100%);
  --font-display:"Futura","Avenir Next Condensed","Arial Narrow",system-ui,sans-serif;
  --font-body:"Avenir Next",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  --font-mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

*,*::before,*::after{box-sizing:border-box}

html{-webkit-text-size-adjust:100%}

body{
  margin:0;
  background:var(--warm-white);
  color:var(--ink);
  font-family:var(--font-body);
  font-weight:500;
  line-height:1.5;
  overflow-x:hidden;
}

img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
b{font-weight:800}

a:focus-visible,
button:focus-visible{
  outline:2px solid var(--rose);
  outline-offset:3px;
  border-radius:6px;
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:100;
  padding:10px 16px;
  background:#fff;
  color:var(--ink);
  border-radius:0 0 8px 0;
}
.skip-link:focus{left:0}

/* ---------- top navigation ---------- */
.top{
  position:relative;
  z-index:20;
  background:#fff;
  border-bottom:1px solid #F1E5DE;
  box-shadow:0 2px 4px rgba(58,27,18,.10);
}
.top .in{
  display:flex;
  align-items:center;
  gap:12px;
  height:44px;
  max-width:1440px;
  margin:0 auto;
  padding:0 clamp(20px,5vw,72px);
}
.top .in img{width:26px;height:26px;border-radius:7px;flex:none}
.top .in b{
  font-family:var(--font-display);
  font-size:clamp(17px,1.32vw,19px);
  font-weight:800;
  font-style:italic;
  letter-spacing:-.2px;
  line-height:1;
}

/* ---------- hero layout ---------- */
.hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,640fr) minmax(0,598fr);
  column-gap:clamp(28px,4.03vw,58px);
  align-items:start;
  max-width:1440px;
  margin:0 auto;
  padding:0 clamp(20px,5vw,72px);
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(ellipse 30.6% 53.6% at 77.8% 54%,rgba(255,213,190,.85) 0%,rgba(255,231,216,.38) 55%,rgba(255,247,243,0) 100%),
    radial-gradient(ellipse 13.2% 17.4% at 89.6% 14.2%,rgba(255,226,200,.60) 0%,rgba(255,226,200,0) 100%);
}
.hero-copy{
  position:relative;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
  padding:60px 0 44px;
}

/* brand */
.brand-row{display:flex;align-items:center;gap:20px;width:100%}
.app-icon{
  width:84px;
  height:84px;
  flex:none;
  border-radius:22px;
  box-shadow:0 16px 32px rgba(217,71,47,.28);
}
.brand-text{min-width:0}
.brand-name{
  font-family:var(--font-display);
  font-size:clamp(24px,2.15vw,31px);
  font-weight:800;
  font-style:italic;
  letter-spacing:-.4px;
  line-height:1;
}
.tagline{
  margin-top:8px;
  font-family:var(--font-mono);
  font-size:clamp(7.5px,.66vw,9.5px);
  font-weight:500;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:var(--slate);
  line-height:1.2;
}

/* eyebrow */
.eyebrow{
  display:flex;
  align-items:center;
  gap:9px;
  margin:24px 0 0;
  font-family:var(--font-mono);
  font-size:clamp(8px,.71vw,10.2px);
  font-weight:500;
  letter-spacing:.17em;
  text-transform:uppercase;
  color:var(--slate);
  line-height:1.4;
}
.eyebrow img{width:16px;height:16px;flex:none}

/* headline */
.hero h1{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  max-width:100%;
  margin:22px 0 0;
  font-family:var(--font-display);
  font-weight:800;
  font-style:italic;
}
.h1-line{
  display:block;
  font-size:clamp(32px,3.75vw,54px);
  line-height:.98;
  letter-spacing:-.8px;
  color:var(--ink);
  white-space:nowrap;
}
.h1-grad{
  display:block;
  padding-right:.12em;
  margin-right:-.12em;
  font-size:clamp(42px,5.28vw,76px);
  line-height:.98;
  letter-spacing:-1.6px;
  background:var(--grad-h-ink);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
  white-space:nowrap;
}

.sub{
  max-width:100%;
  margin:18px 0 0;
  font-size:clamp(13px,1.08vw,15.5px);
  font-weight:500;
  line-height:1.68;
  color:var(--slate);
}

/* benefit card */
.benefits{
  display:grid;
  grid-template-columns:1fr 1fr;
  width:100%;
  min-height:144px;
  margin-top:20px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(27,27,31,.07);
  border-radius:22px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.70);
  overflow:hidden;
}
.benefit{
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  padding:24px 22px;
}
.benefit + .benefit::before{
  content:"";
  position:absolute;
  left:0;
  top:24px;
  bottom:24px;
  width:1px;
  background:#EFE3DC;
}
.ic{width:40px;height:40px;flex:none}
.benefit-text{min-width:0}
.benefit h2{
  margin:0;
  font-family:var(--font-body);
  font-size:clamp(12.5px,1.01vw,14.5px);
  font-weight:700;
  line-height:1.24;
  letter-spacing:-.1px;
}
.benefit p{
  margin:4px 0 0;
  font-size:clamp(10.5px,.80vw,11.5px);
  font-weight:500;
  line-height:1.3;
  color:var(--slate);
}
.br-mob{display:none}

/* App Store badge */
.store{
  display:block;
  flex:none;
  width:196px;
  height:58px;
  margin-top:26px;
  border-radius:14px;
  transition:transform .2s ease,box-shadow .2s ease;
}
.store img{width:100%;height:100%}
.store:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgba(17,17,20,.24)}
.store:focus-visible{border-radius:14px}

/* ---------- hero visual (100 x 124 design canvas, scaled with cqw) ---------- */
.visual{
  position:relative;
  z-index:1;
  width:100%;
  min-width:0;
  aspect-ratio:100 / 124;
  container-type:inline-size;
  margin-top:4px;
}
.glow{
  position:absolute;
  left:14cqw;
  top:-2cqw;
  width:84cqw;
  height:84cqw;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,196,158,.30) 0%,rgba(255,214,190,.12) 55%,rgba(255,247,243,0) 72%);
  z-index:0;
  pointer-events:none;
}

/* phone shells: black frame + rounded corners + dynamic island.
   The screenshots are 546x1183 and include status bar + bottom tab bar,
   so the screen keeps that exact aspect ratio and is never cropped. */
.phone{
  position:absolute;
  z-index:3;
  padding:1.5cqw;
  border:1px solid rgba(255,255,255,.14);
  border-radius:7.8cqw;
  background:linear-gradient(160deg,#232327 0%,#0c0c0e 48%,#1a1a1e 100%);
  box-shadow:0 4.6cqw 4.4cqw rgba(45,18,12,.34),inset 0 0 0 1px rgba(0,0,0,.7);
}
.phone-screen{
  position:relative;
  width:100%;
  aspect-ratio:546 / 1183;
  overflow:hidden;
  border-radius:6.6cqw;
  background:#08080a;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.75);
}
.phone-screen img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* back phone: Novel, upper-left, smaller, rotated the other way, dimmed */
.phone-back{
  left:4cqw;
  top:3cqw;
  width:38cqw;
  transform:rotate(-6deg);
  z-index:2;
}
.phone-back .phone-screen{filter:brightness(.62) saturate(.85)}

/* front phone: Dramas, centered, slight clockwise tilt */
.phone-front{
  left:30cqw;
  top:11.5cqw;
  width:46cqw;
  transform:rotate(5deg);
  z-index:3;
}

.island{
  position:absolute;
  top:1.9cqw;
  left:50%;
  width:26%;
  height:3.35cqw;
  transform:translateX(-50%);
  border-radius:1.7cqw;
  background:#050506;
  z-index:2;
}
.island::after{
  content:"";
  position:absolute;
  right:16%;
  top:50%;
  width:1.9cqw;
  height:1.9cqw;
  max-width:7px;
  max-height:7px;
  transform:translateY(-50%);
  border-radius:50%;
  background:#141b2a;
}
.phone-button{
  position:absolute;
  width:.36cqw;
  border-radius:1cqw;
  background:#2b2b31;
}
.phone-button-a{right:-.3cqw;top:32cqw;height:10cqw}
.phone-button-b{left:-.3cqw;top:27cqw;height:6cqw}
.phone-button-c{left:-.3cqw;top:35cqw;height:6cqw}

/* floating coins / gift */
.float{position:absolute;z-index:5;animation:float 7s ease-in-out infinite}
.coin-1{left:87.5cqw;top:31cqw;width:6.2cqw;height:auto}
.coin-2{left:4.5cqw;top:98cqw;width:5.2cqw;height:auto;animation-delay:-2s}
.coin-3{left:85cqw;top:58cqw;width:4.4cqw;height:auto;animation-delay:-4s}
.gift-1{left:90.5cqw;top:102cqw;width:8.2cqw;height:auto;animation-delay:-1s}

@keyframes float{
  0%,100%{translate:0 0}
  50%{translate:0 -1.1cqw}
}

/* dashed connectors */
.connectors{
  position:absolute;
  inset:0;
  z-index:6;
  width:100%;
  height:100%;
  overflow:visible;
  pointer-events:none;
}

/* white bubbles — placed outside the screen content so titles and the bottom tab stay clear */
.bubble{
  position:absolute;
  z-index:8;
  display:flex;
  align-items:center;
  gap:.6em;
  padding:.42em 1em .42em .42em;
  background:#fff;
  border:1px solid rgba(27,27,31,.06);
  border-radius:2.9em;
  box-shadow:0 1.4cqw 1.7cqw rgba(122,50,32,.16);
  font-family:var(--font-body);
  font-size:clamp(10px,2.15cqw,12.8px);
  font-weight:700;
  letter-spacing:-.1px;
  line-height:1;
  white-space:nowrap;
}
.bubble-icon{
  display:grid;
  place-items:center;
  width:2.4em;
  height:2.4em;
  flex:none;
  border-radius:50%;
}
.bubble-icon img{width:73%;height:73%}
.bubble-icon.gift{background:#FFEFDA}
.bubble-icon.gift img{width:62%;height:62%}
.bubble-icon.coin{background:#FFF3D6}
.bubble-watch{right:-1.5cqw;top:.5cqw}
.bubble-read{left:-6.5cqw;top:42cqw}

/* ---------- footer ---------- */
.site-footer{
  position:relative;
  padding:24px 20px 26px;
  background:var(--footer);
  color:#F1EAE5;
  text-align:center;
  font-family:var(--font-body);
  font-size:11.5px;
  line-height:1.4;
}
.site-footer::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:3px;
  background:var(--grad-h);
}
.foot-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  row-gap:8px;
  font-size:11.5px;
}
.foot-nav a{
  padding:0 16px;
  border-left:1px solid #7C7370;
  line-height:1.2;
}
.foot-nav a:first-child{border-left:0}
.foot-nav a:hover{color:#fff}
.copyright{margin:10px 0 0;font-size:10.3px;color:#AFA4A0}
.foot-mail{margin:5px 0 0;font-family:var(--font-mono);font-size:10px;letter-spacing:.03em;color:#C9BDB7}
.foot-mail a:hover{color:#fff}

/* ---------- terms / privacy documents ---------- */
.doc{
  max-width:820px;
  min-height:70vh;
  margin:0 auto;
  padding:40px 24px 64px;
  background:#fff;
}
.doc h1{
  margin:0 0 6px;
  font-family:var(--font-body);
  font-size:34px;
  font-weight:800;
  font-style:normal;
  line-height:1.2;
  letter-spacing:0;
}
.doc h2{margin:28px 0 8px;font-size:20px;line-height:1.3}
.doc p,.doc li{margin:0 0 8px;font-size:15px;line-height:1.6;color:#444}
.doc ul{margin:0 0 12px;padding-left:22px}
.doc .date{margin-bottom:12px;font-size:13px;color:var(--slate)}
.doc a{color:#C21F45;text-decoration:underline}

/* ---------- mid desktop (1024–1199): keep two columns, shrink copy ---------- */
@media (min-width:1024px) and (max-width:1199px){
  .hero-copy{padding:44px 0 32px}
  .brand-row{gap:14px}
  .app-icon{width:64px;height:64px;border-radius:17px}
  .brand-name{font-size:24px}
  .tagline{font-size:7.5px;letter-spacing:.18em}
  .eyebrow{margin-top:18px;font-size:8.5px;letter-spacing:.13em}
  .eyebrow img{width:14px;height:14px}
  .hero h1{margin-top:16px}
  .sub{margin-top:14px}
  .benefits{margin-top:16px}
  .store{width:172px;height:51px;margin-top:20px}
  .benefit{padding:16px 14px;gap:10px}
  .ic{width:34px;height:34px}
  .visual{margin-top:8px}
}

/* ---------- mobile / single column ---------- */
@media (max-width:1023px){
  .hero{
    grid-template-columns:1fr;
    column-gap:0;
  }
  .hero-copy{
    width:100%;
    max-width:560px;
    margin:0 auto;
    padding:22px 0 0;
  }
  .top .in{gap:10px}
  .top .in img{width:24px;height:24px;border-radius:6px}
  .brand-row{gap:14px}
  .app-icon{
    width:60px;
    height:60px;
    border-radius:16px;
    box-shadow:0 12px 26px rgba(217,71,47,.26);
  }
  .brand-name{font-size:25px;letter-spacing:-.3px}
  .tagline{margin-top:6px;font-size:8.2px;letter-spacing:.22em}
  .eyebrow{margin-top:12px;gap:7px;font-size:8.4px;letter-spacing:.15em}
  .eyebrow img{width:14px;height:14px}
  .hero h1{margin-top:26px}
  .h1-line{
    font-size:clamp(32px,10.6vw,44px);
    line-height:.92;
    letter-spacing:-.7px;
  }
  .h1-grad{
    margin-top:4px;
    font-size:clamp(40px,12.4vw,54px);
    line-height:1;
    letter-spacing:-1.2px;
  }
  .sub{margin-top:12px;font-size:13px;line-height:20px}
  .br-desk{display:none}

  .benefits{
    grid-template-columns:1fr;
    min-height:0;
    margin-top:20px;
    border-radius:20px;
  }
  .benefit{min-height:70px;padding:12px 20px;gap:10px}
  .benefit + .benefit::before{
    left:16px;
    right:16px;
    top:0;
    bottom:auto;
    width:auto;
    height:1px;
  }
  .ic{width:34px;height:34px}
  .benefit h2{font-size:13.2px;line-height:17px}
  .benefit p{margin-top:3px;font-size:10.3px;line-height:13px}
  .br-mob{display:inline}

  .store{
    width:176px;
    height:52px;
    margin-top:20px;
    border-radius:12.6px;
  }

  /* mobile: one real screenshot + one bubble, below the copy and button */
  .visual{
    display:flex;
    flex-direction:column;
    align-items:center;
    width:100%;
    max-width:560px;
    margin:24px auto 0;
    aspect-ratio:auto;
    padding-bottom:10px;
  }
  .glow{
    left:12%;
    top:16%;
    width:76%;
    height:76%;
  }

  .phone-back{display:none}
  .phone{
    position:relative;
    left:auto;
    top:auto;
    transform:none;
    padding:8px;
    border-radius:46px;
    box-shadow:0 22px 34px rgba(45,18,12,.30),inset 0 0 0 1px rgba(0,0,0,.7);
  }
  .phone-front{
    width:min(72vw,380px);
    margin:0 auto;
  }
  .phone-screen{border-radius:38px}
  .island{
    top:10px;
    width:26%;
    height:auto;
    aspect-ratio:125 / 34;
    border-radius:9px;
  }
  .island::after{width:6px;height:6px;right:16%}
  .phone-button{width:3px;border-radius:2px}
  .phone-button-a{right:-4px;top:80px;height:56px}
  .phone-button-b{left:-4px;top:66px;height:32px}
  .phone-button-c{left:-4px;top:106px;height:32px}

  /* only one bubble on mobile, sitting above the phone */
  .bubble{
    position:static;
    transform:none;
    align-self:center;
    margin:0 0 16px;
    padding:.42em 1.05em .42em .42em;
    border-radius:2.9em;
    box-shadow:0 8px 16px rgba(122,50,32,.15);
    font-size:12px;
    white-space:nowrap;
  }
  .bubble-icon{width:2.5em;height:2.5em}
  .bubble-read{display:none}
  .float,.connectors{display:none}

  .site-footer{padding:22px 16px 24px}
  .foot-nav{font-size:11px;row-gap:7px}
  .foot-nav a{padding:0 11px}
  .copyright{margin-top:9px;font-size:9.5px}
  .foot-mail{font-size:9.5px}
}

@supports not ((background-clip:text) or (-webkit-background-clip:text)){
  /* Never leave the headline invisible if text clipping is unsupported. */
  .h1-grad{
    background:none;
    color:var(--rose);
    -webkit-text-fill-color:currentColor;
  }
}

@media (forced-colors:active){
  .h1-grad{
    background:none;
    color:CanvasText;
    -webkit-text-fill-color:CanvasText;
  }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation:none !important;
    transition:none !important;
  }
}
