/* FocusedMe website. The app's own colours (flutter_app/lib/theme.dart) in
   light and dark, Inter, and the apple-design skill's rules: translucent
   chrome that content scrolls under, size-specific tracking, feedback on
   press, and gentler equivalents for reduced motion, reduced transparency
   and higher contrast. */
:root {
  --bg: #F6F3EC; --surface: #FFFFFF; --surface-high: #EFEBE2; --outline: #DCD6CA;
  --text: #171A1F; --muted: #5B6270; --accent: #F2A03D; --warm: #E8623F;
  --on-accent: #1B1204; --link: #A8560B; --glow: rgba(242, 160, 61, .22);
  --bar: rgba(246, 243, 236, .72); --bar-edge: rgba(255, 255, 255, .7);
  --shadow: 0 1px 2px rgba(23, 26, 31, .04), 0 12px 32px rgba(23, 26, 31, .08);
  --radius: 1.5rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0D10; --surface: #161A21; --surface-high: #1F242D; --outline: rgba(255, 255, 255, .09);
    --text: #F2F4F7; --muted: #A3ABB9; --accent: #FFB454; --warm: #FF7A59;
    --link: #FFB454; --glow: rgba(255, 154, 60, .30);
    --bar: rgba(11, 13, 16, .68); --bar-edge: rgba(255, 255, 255, .06);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);
  }
}
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/Inter-Regular.ttf) format("truetype"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/Inter-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Inter Display"; font-weight: 700; font-display: swap; src: url(/fonts/InterDisplay-Bold.ttf) format("truetype"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }

/* Type: tracking tightens and leading closes as size grows; small text opens up. */
h1, h2, h3 { font-family: "Inter Display", Inter, system-ui, sans-serif; font-weight: 700; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); line-height: 1.04; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -.028em; }
h3 { font-size: 1.1875rem; line-height: 1.25; letter-spacing: -.012em; }
p { margin: 0 0 1em; }
.eyebrow { font: 600 .8125rem/1.3 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem; }
.note { font-size: .9375rem; line-height: 1.5; letter-spacing: .005em; color: var(--muted); }

/* Links: feedback the instant they are pressed, not on release. */
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: .4rem; }
nav a, .brand { display: inline-block; transition: transform 100ms ease-out, opacity 100ms ease-out; }
nav a:active, .brand:active { transform: scale(.97); opacity: .7; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem .75rem; border-radius: .5rem; z-index: 3; }

/* The bar: a translucent material the page scrolls under, with a soft scroll
   edge instead of a hard divider. */
.bar {
  position: sticky; top: 0; z-index: 2;
  background: var(--bar);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--bar-edge);
  padding-top: env(safe-area-inset-top);
}
.bar-inner, .foot-inner, main { max-width: 68rem; margin: 0 auto; padding-left: max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); font: 700 1.1875rem "Inter Display", Inter, sans-serif; letter-spacing: -.02em; }
.brand img { width: 1.75rem; height: 1.75rem; }
nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.bar nav { flex-wrap: nowrap; }
@media (max-width: 26rem) {
  .bar nav { gap: .9rem; }
  .bar nav a { font-size: .875rem; }
  .bar .brand { font-size: 1.0625rem; }
}
nav a { color: var(--muted); text-decoration: none; font-size: .9375rem; font-weight: 600; letter-spacing: .005em; padding: .5rem 0; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); }

/* Home. */
main.home section { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.hero { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: 1fr; padding-top: clamp(2.5rem, 6vw, 5rem) !important; }
.hero h1 { margin-bottom: 1.25rem; max-width: 12ch; }
.lead { font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.5; color: var(--muted); max-width: 32rem; margin-bottom: 1.25rem; }
.status {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.5rem;
  padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--outline); background: var(--surface);
  font-size: .875rem; font-weight: 600; letter-spacing: .005em; color: var(--text);
}
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--glow); flex: none; }

/* The app's real screens, in a soft glow. */
.phone { margin: 0 auto; width: min(19rem, 78vw); position: relative; }
.phone::before { content: ""; position: absolute; inset: 12% -18% 6%; background: radial-gradient(closest-side, var(--glow), transparent); z-index: -1; }
.phone img { border-radius: 2.6rem; box-shadow: var(--shadow); }
.phone-hero { width: min(21rem, 82vw); }

.row { display: grid; gap: clamp(2rem, 6vw, 5rem); align-items: center; grid-template-columns: 1fr; }
.row-text { max-width: 30rem; }
.row h2 { margin-bottom: 1rem; }
.row-text > p:not(.eyebrow) { color: var(--muted); font-size: 1.125rem; line-height: 1.55; }
.modes { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .6rem; }
.modes li { padding: .85rem 1rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--outline); color: var(--muted); }
.modes strong { color: var(--text); font-weight: 600; }

.rules h2, .plans-section h2 { margin-bottom: 2rem; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.grid li, .plans article { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 1.5rem; }
.grid svg { width: 1.75rem; height: 1.75rem; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; }
.grid h3 { margin-bottom: .35rem; }
.grid p, .plans p { color: var(--muted); margin: 0; }

.promise { text-align: center; }
.promise h2 { margin-bottom: 1.5rem; }
.ticks { list-style: none; padding: 0; margin: 0 auto 1.5rem; display: grid; gap: .75rem; max-width: 34rem; text-align: left; }
.ticks li { padding-left: 2rem; position: relative; font-size: 1.125rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--glow); }
.ticks li::after { content: ""; position: absolute; left: .42rem; top: .52em; width: .32rem; height: .6rem; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-bottom: 1.25rem; }
.plans .best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.tag { display: inline-block; margin-bottom: .75rem !important; padding: .2rem .6rem; border-radius: 999px; background: var(--glow); color: var(--text) !important; font-size: .8125rem; font-weight: 600; letter-spacing: .01em; }
.plans h3 { margin-bottom: .4rem; }
.price { font: 700 2rem/1.1 "Inter Display", Inter, sans-serif; letter-spacing: -.03em; color: var(--text) !important; margin-bottom: .5rem !important; }
.price span { font: 400 1rem Inter, sans-serif; letter-spacing: 0; color: var(--muted); }

.mac { text-align: center; }
.mac h2 { margin-bottom: .75rem; }
.mac p { color: var(--muted); max-width: 34rem; margin: 0 auto; font-size: 1.125rem; }

@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.15fr .85fr; }
  .row { grid-template-columns: .85fr 1.15fr; }
  .row.flip .phone { order: 2; }
}

/* Legal and help pages: one readable column. */
main.doc { max-width: 44rem; padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: 5rem; }
main.doc h1 { font-size: clamp(2.125rem, 5vw, 3rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 1.25rem; }
main.doc h2 { font-size: clamp(1.25rem, 2.6vw, 1.5rem); line-height: 1.25; letter-spacing: -.018em; margin: 2.5rem 0 .75rem; }
main.doc p, main.doc li { line-height: 1.7; }
main.doc ul { padding-left: 1.25rem; margin: 0 0 1em; }
main.doc li { margin-bottom: .55em; }
main.doc li::marker { color: var(--accent); }

.foot { border-top: 1px solid var(--outline); color: var(--muted); font-size: .9375rem; }
.foot-inner { padding-top: 2rem; padding-bottom: calc(2.5rem + env(safe-area-inset-bottom)); display: grid; gap: 1rem; }
.foot nav { gap: .5rem 1.25rem; }
.foot p { margin: 0; }

/* Arrival: the hero materialises (opacity, scale and blur together); later
   sections settle in as they scroll into view. Only when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-text, .phone-hero { animation: arrive 700ms cubic-bezier(.2, .8, .2, 1) both; }
  .phone-hero { animation-delay: 120ms; }
  @keyframes arrive { from { opacity: 0; transform: translateY(1rem) scale(.98); filter: blur(6px); } }
  @supports (animation-timeline: view()) {
    main.home section:not(.hero) > * { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes settle { from { opacity: 0; transform: translateY(1.5rem); } }
  }
}
/* Reduced motion keeps a gentle cross-fade, no travel. */
@media (prefers-reduced-motion: reduce) {
  .hero-text, .phone-hero { animation: fade 300ms ease both; }
  @keyframes fade { from { opacity: 0; } }
  nav a:active, .brand:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--outline); }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--text); --outline: currentColor; }
  .bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .phone::before { display: none; }
}
