/* syllyapp.com: one stylesheet for the home page and the privacy page */

@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Gabarito"; src: url("fonts/gabarito.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Tinos"; src: url("fonts/tinos-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tinos"; src: url("fonts/tinos-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: only light;   /* light-only design, see the meta tags in each page */
  --ground: #FFFFFF;
  --wash: #EDF6FA;
  --line: #D9E6EC;
  --ink: #12222B;
  --ink-soft: #52646E;
  --blue: #6CB3D6;        /* BrandPrimary from the Xcode assets */
  --blue-deep: #256E93;   /* the brand blue is too pale for small text on white */
  --night: #0C161B;
  --paper: #FFFEFA;
  --paper-ink: #2A2A28;

  --display: "Gabarito", "Avenir Next", "Trebuchet MS", sans-serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --serif: "Tinos", "Times New Roman", Times, serif;

  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 9vw, 112px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: 72px; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 700; line-height: 1.1; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 34em; }
.muted { color: var(--ink-soft); }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.bar.stuck { border-bottom-color: var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); }
.brand span { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--blue); letter-spacing: -0.02em; }
.bar nav { display: flex; gap: 28px; }
.bar nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.bar nav a:hover { color: var(--blue-deep); }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--ink);
  font-weight: 700; font-size: .9375rem; text-decoration: none;
  padding: 9px 18px; border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--blue-deep) 70%, transparent); }

/* Hero */
.hero { padding-block: clamp(32px, 6vw, 72px) var(--section); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.mark { display: flex; align-items: center; gap: 18px; }
.mark img { width: 88px; height: 88px; border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--blue-deep) 80%, transparent); }
.mark b { font-family: var(--display); font-weight: 800; font-size: 3.25rem; line-height: 1; color: var(--blue); letter-spacing: -0.03em; }
.mark small { display: block; font-weight: 600; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.badge img { height: 56px; width: auto; }
.badge:hover { transform: translateY(-3px); box-shadow: 0 16px 28px -16px var(--night); }
.facts { font-size: .9375rem; color: var(--ink-soft); }
.facts b { color: var(--ink); font-weight: 700; }

/* cqw units below size the paper's text off the stage width */
.stage { position: relative; container-type: inline-size; display: grid; justify-items: end; padding-block: 5% 3%; }
.halo { position: absolute; width: 92%; aspect-ratio: 1; right: -6%; top: 6%; border-radius: 50%; background: var(--wash); }
.phone {
  position: relative; display: block; background: var(--night);
  padding: 2.6%; border-radius: 15% / 7%;
  box-shadow: 0 30px 50px -30px color-mix(in srgb, var(--night) 70%, transparent);
}
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 1320 / 2868; object-fit: cover; border-radius: 13% / 6%; }
.stage .phone { width: 54%; margin-right: 7%; z-index: 2; animation: float 7s ease-in-out infinite; }

.paper {
  position: absolute; left: 0; top: 17%; width: 55%; z-index: 1;
  background: var(--paper); color: var(--paper-ink);
  font-family: var(--serif); font-size: 2.35cqw; line-height: 1.35;
  padding: 6.5% 5.5% 7%; border: 1px solid var(--line); border-radius: 3px;
  transform: rotate(-5deg); overflow: hidden;
  box-shadow: 0 22px 34px -24px color-mix(in srgb, var(--night) 60%, transparent);
}
.paper .t { font-weight: 700; font-size: 1.55em; text-align: center; }
.paper .s { text-align: center; font-size: .92em; margin-bottom: 1.1em; }
.paper .rule { height: .28em; border-radius: 1px; background: color-mix(in srgb, var(--paper-ink) 16%, transparent); margin-bottom: .55em; }
.paper .rule.short { width: 62%; }
.paper .h { font-weight: 700; margin: 1.1em 0 .35em; border-bottom: 1px solid var(--paper-ink); padding-bottom: .15em; }
/* delays are timed so each row lights up as the beam passes it */
.paper .row { display: grid; grid-template-columns: 1.1em minmax(0, 1fr) auto; gap: .5em; padding: .32em .3em; border-radius: 2px; animation: found 6s linear infinite; }
.paper .row:nth-of-type(1) { animation-delay: 2.0s; }
.paper .row:nth-of-type(2) { animation-delay: 2.3s; }
.paper .row:nth-of-type(3) { animation-delay: 2.55s; }
.paper .row:nth-of-type(4) { animation-delay: 2.8s; }
.paper .row:nth-of-type(5) { animation-delay: 3.05s; }
.paper .row span:last-child { font-variant-numeric: tabular-nums; }
.beam {
  position: absolute; left: 0; right: 0; top: 0; height: 12%;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--blue) 45%, transparent));
  border-bottom: 2px solid var(--blue);
  transform: translateY(-100%);
  animation: scan 6s linear infinite;
}
@keyframes scan {
  0% { top: 0; opacity: 0; }
  6% { opacity: 1; }
  56% { top: 100%; opacity: 1; }
  62%, 100% { top: 100%; opacity: 0; }
}
@keyframes found {
  0% { background: transparent; }
  3% { background: color-mix(in srgb, var(--blue) 60%, transparent); }
  12%, 55% { background: color-mix(in srgb, var(--blue) 24%, transparent); }
  66%, 100% { background: transparent; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }

/* Steps */
.steps { padding-block: var(--section); border-top: 1px solid var(--line); }
.head { display: grid; gap: 12px; margin-bottom: clamp(32px, 5vw, 56px); }
.steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.step { display: grid; gap: 22px; align-content: start; min-width: 0; }
.step .phone { width: min(100%, 250px); transition: transform .5s var(--ease); }
.step:hover .phone { transform: translateY(-8px); }
.step-text { display: grid; gap: 6px; }
.num { font-family: var(--display); font-weight: 800; font-size: 2.5rem; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }

/* More than due dates */
.band { background: var(--wash); padding-block: var(--section); }
.band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.band-copy { display: grid; gap: 18px; min-width: 0; }
.fine { display: grid; margin-top: 8px; border-top: 1px solid color-mix(in srgb, var(--blue-deep) 28%, transparent); }
.fine div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid color-mix(in srgb, var(--blue-deep) 28%, transparent); }
.fine dt { font-weight: 700; }
.fine dd { color: var(--ink-soft); }
.note { font-size: .875rem; color: var(--ink-soft); }
.duo { display: flex; align-items: flex-start; justify-content: center; min-width: 0; }
.duo .phone { width: 50%; }
.duo .phone + .phone { margin: 16% 0 0 -7%; }

/* Features */
.features { padding-block: var(--section); }
.features ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 48px); }
.features li { display: grid; gap: 6px; align-content: start; padding-block: 22px 26px; border-top: 2px solid var(--ink); min-width: 0; }
.features li p { color: var(--ink-soft); }

/* FAQ */
.faq { padding-block: var(--section); border-top: 1px solid var(--line); }
.faq .wrap { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq-list { display: grid; border-top: 1px solid var(--line); min-width: 0; }
details { border-bottom: 1px solid var(--line); }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  list-style: none; cursor: pointer; padding-block: 18px;
  font-family: var(--display); font-weight: 700; font-size: 1.1875rem; line-height: 1.3;
}
summary::-webkit-details-marker { display: none; }
/* plus sign drawn from two gradients, turns into an x when open */
summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--blue-deep), var(--blue-deep)) center / 100% 2px no-repeat,
    linear-gradient(var(--blue-deep), var(--blue-deep)) center / 2px 100% no-repeat;
  transition: transform .3s var(--ease);
}
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-soft); padding-bottom: 20px; max-width: 38em; }

/* Closing */
.close { background: var(--wash); padding-block: var(--section); }
.close .wrap { display: grid; justify-items: start; gap: 20px; }
.close .octo { width: 88px; height: 88px; border-radius: 22px; border: 1px solid var(--line); animation: float 6s ease-in-out infinite; }

footer { padding-block: 32px; font-size: .9375rem; color: var(--ink-soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: baseline; }
footer b { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--blue); margin-right: auto; }

/* Privacy page */
.policy { padding-block: clamp(32px, 6vw, 72px) var(--section); }
.policy .wrap { max-width: 760px; display: grid; gap: 16px; }
.policy h1 { font-size: clamp(2rem, 5vw, 3rem); }
.policy h2 { font-size: 1.5rem; margin-top: 20px; }
.policy ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 8px; }
.policy .updated { color: var(--ink-soft); font-size: .9375rem; }

/* main.js adds .anim, so the page still reads fully if the script never runs */
.anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.anim .reveal.in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .bar nav { display: none; }
  .hero .wrap, .band .wrap, .faq .wrap { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 440px; width: 100%; margin-inline: auto; }
  .steps ol { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .step { grid-template-columns: minmax(0, 140px) minmax(0, 1fr); align-items: center; gap: 20px; }
  .features ul { grid-template-columns: minmax(0, 1fr); }
  .duo { max-width: 440px; margin-inline: auto; width: 100%; }
}
@media (min-width: 821px) and (max-width: 1000px) {
  .features ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .stage .phone, .close .octo { animation: none; }
  .beam { display: none; }
  .paper .row { animation: none; background: color-mix(in srgb, var(--blue) 24%, transparent); }
  .pill, .badge, .step .phone { transition: none; }
}
