/* ThemeFit website. Colours, fonts and corner radii follow the app (HVDesign.swift, app icon). */

@font-face {
  font-family: "Baloo Bhaijaan 2";
  src: url("fonts/baloo-bhaijaan-2-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* App: Surface, Canvas, TextPrimary, Border. Secondary text and link pink are darkened to pass WCAG AA. */
  --blush: #FFF4F8;
  --paper: #FFFFFF;
  --ink: #2B2130;
  --ink-2: #6B5A6E;
  --line: #F6E3EC;
  --chip: #FDECF4;
  --pink: #FF4D8D;
  --pink-ink: #C8175F;
  --button: #D81B66;
  --button-ink: #FFFFFF;
  --button-hover: #B8145A;
  /* The splash and icon wallpaper. */
  --wallpaper: linear-gradient(150deg, #FBCDD4 0%, #F9AED2 48%, #FA88EF 100%);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --tile-shadow: 0 18px 40px -18px rgba(153, 41, 89, 0.45);

  --display: "Baloo Bhaijaan 2", "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1120px;
  --measure: 68ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blush: #211829;
    --paper: #150F1A;
    --ink: #FFFFFF;
    --ink-2: #A99BAE;
    --line: #372A42;
    --chip: #2C2136;
    --pink: #FF7FB0;
    --pink-ink: #FF7FB0;
    --button: #FF7FB0;
    --button-ink: #2B2130;
    --button-hover: #FF9EC1;
    --wallpaper: linear-gradient(150deg, #5A2A46 0%, #6E2F63 50%, #8A3A8F 100%);
    --glass: rgba(33, 24, 41, 0.55);
    --glass-strong: rgba(33, 24, 41, 0.82);
    --glass-edge: rgba(255, 255, 255, 0.14);
    --tile-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
/* Only Home has the sticky header. */
html:has(.site-header) { scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--blush);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--pink-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pink-ink); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); margin: 0; }
h1 { font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 12px;
}
.skip:focus { top: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--blush) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 700 22px/1 var(--display); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--chip); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--chip); }

/* Buttons. The App Store button follows Apple's black badge; the app's own buttons are pink capsules. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border-radius: 999px; font: 600 16px/1 var(--text); text-decoration: none; }
.btn-store { background: #000; color: #fff; }
.btn-store:hover { background: #2B2130; }
.btn-store svg { width: 22px; height: 22px; fill: currentColor; }
.btn-store span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.btn-store small { font-size: 11px; font-weight: 500; opacity: 0.85; }
.btn-store strong { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
@media (prefers-color-scheme: dark) {
  .btn-store { background: #fff; color: #000; }
  .btn-store:hover { background: #FFE6F0; }
}
.btn-quiet { color: var(--ink); background: var(--glass-strong); border: 1px solid var(--glass-edge); }
.btn-quiet:hover { background: var(--paper); }

/* Home: the hero is a Home Screen. Tiles use the iOS widget sizes: small 2x2, medium 4x2, large 4x4 cells. */
.home-screen { padding: 12px 0 72px; }
.screen {
  position: relative; border-radius: 40px; padding: clamp(14px, 2.6vw, 28px);
  background: var(--wallpaper); overflow: hidden;
}
.screen::before {
  /* Soft light patches, like the icon's frosted wallpaper. */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(38% 46% at 82% 12%, rgba(255, 255, 255, 0.45), transparent 70%),
    radial-gradient(30% 40% at 8% 92%, rgba(255, 255, 255, 0.35), transparent 70%);
}
.grid {
  --gap: clamp(12px, 2vw, 22px);
  position: relative; display: grid; gap: var(--gap); container-type: inline-size;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.tile {
  position: relative; border-radius: clamp(22px, 2.6vw, 30px);
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--tile-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  color: var(--ink); overflow: hidden;
}
.tile-large { grid-column: span 4; grid-row: span 2; background: var(--glass-strong);
  padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.tile-medium { grid-column: span 4; aspect-ratio: 338 / 158; }
.tile-small { grid-column: span 2; aspect-ratio: 1; }
@media (min-width: 921px) {
  /* Beside the large tile the others fill its height, never shorter than their widget proportions. */
  .tile-medium, .tile-small { aspect-ratio: auto; align-self: stretch; }
  .tile-medium { min-height: calc(((100cqw - 7 * var(--gap)) / 2 + 3 * var(--gap)) * 158 / 338); }
  .tile-small { min-height: calc((100cqw - 7 * var(--gap)) / 4 + var(--gap)); }
}

.tile-large h1 { font-size: clamp(40px, 5.4vw, 66px); line-height: 1.02; margin: 0 0 18px; max-width: 12ch; }
.tile-large .lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 40ch; margin-bottom: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tile-large .note { font-size: 14px; color: var(--ink-2); margin: 18px 0 0; }

/* Clock widget: the "15:42 / Tue, 24 Jun" of the app icon. */
.clock { display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px, 3vw, 34px); height: 100%; }
.clock time { display: block; font: 800 clamp(54px, 7vw, 92px)/0.9 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.clock .date { display: block; font-size: clamp(14px, 1.5vw, 18px); font-weight: 500; color: var(--ink-2); margin-top: 6px; }
.clock svg { width: 34%; max-width: 150px; height: auto; flex: none; }

/* Countdown and weather widgets. */
.small-widget { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: clamp(14px, 2vw, 22px); }
.small-widget .big { font: 800 clamp(44px, 5.4vw, 70px)/0.9 var(--display); font-variant-numeric: tabular-nums; }
.small-widget .unit { font-weight: 600; font-size: clamp(13px, 1.3vw, 16px); }
.small-widget .caption { display: block; font-size: clamp(12px, 1.2vw, 14px); color: var(--ink-2); line-height: 1.3; margin-top: 4px; }
.small-widget svg { width: 46%; height: auto; }
.countdown .bar { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--pink) 22%, transparent); overflow: hidden; margin-top: 8px; }
.countdown .bar i { display: block; width: 72%; height: 100%; border-radius: inherit; background: var(--pink); }

.screen-dots { display: flex; justify-content: center; gap: 7px; margin-top: clamp(14px, 2vw, 22px); position: relative; }
.screen-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
.screen-dots i:first-child { background: rgba(255, 255, 255, 0.95); }

/* One entrance for the whole Home Screen, like widgets settling after unlock. */
@media (prefers-reduced-motion: no-preference) {
  .grid .tile { animation: settle 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .grid .tile:nth-child(2) { animation-delay: 0.08s; }
  .grid .tile:nth-child(3) { animation-delay: 0.16s; }
  .grid .tile:nth-child(4) { animation-delay: 0.22s; }
  @keyframes settle { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
}

/* Sections below the hero stay quiet. */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.08; margin-bottom: 12px; }
.section-head p { color: var(--ink-2); margin: 0; }

.ways { display: grid; gap: 40px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.way h3 { font-size: 26px; line-height: 1.15; margin: 20px 0 8px; }
.way p { color: var(--ink-2); margin: 0; max-width: 36ch; }
.way .glyph { height: 92px; display: flex; align-items: flex-end; gap: 8px; }
.way .glyph b { display: block; border-radius: 14px; background: var(--wallpaper); box-shadow: var(--tile-shadow); }
.glyph-pair b:nth-child(1) { width: 46px; height: 92px; }
.glyph-pair b:nth-child(2) { width: 46px; height: 92px; filter: hue-rotate(-18deg) saturate(1.1); }
.glyph-make b { width: 72px; height: 92px; position: relative; }
.glyph-make b::before { content: ""; position: absolute; inset: 14px 12px 30px; border-radius: 10px; border: 2px dashed rgba(255, 255, 255, 0.9); }
.glyph-make b::after { content: "\2665"; position: absolute; right: -10px; bottom: 6px; font: 700 26px/1 var(--display); color: var(--pink); }
.glyph-widgets b:nth-child(1) { width: 44px; height: 44px; }
.glyph-widgets b:nth-child(2) { width: 96px; height: 44px; }
.glyph-widgets { flex-wrap: wrap; width: 148px; align-content: flex-end; }

.kinds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.kinds li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.kinds strong { font: 700 20px/1.3 var(--display); }
.kinds span { color: var(--ink-2); }
.kinds-note { margin: 28px 0 0; color: var(--ink-2); max-width: var(--measure); }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan { border-radius: 28px; padding: 32px; background: var(--paper); border: 1px solid var(--line); }
.plan-premium { background: linear-gradient(160deg, color-mix(in srgb, #FBCDD4 55%, var(--paper)), color-mix(in srgb, #FA88EF 22%, var(--paper))); border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .plan-premium { background: linear-gradient(160deg, #3A2234, #43264A); }
}
.plan h3 { font-size: 30px; line-height: 1.1; margin-bottom: 6px; }
.plan .sub { color: var(--ink-2); margin-bottom: 20px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 8px 0 8px 30px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--pink-ink); border-bottom: 2.5px solid var(--pink-ink); transform: rotate(-45deg); }
.plans-note { margin: 24px 0 0; color: var(--ink-2); font-size: 15px; max-width: var(--measure); }

.help-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.help-links a { display: block; padding: 18px 0; border-top: 2px solid var(--ink); color: var(--ink); text-decoration: none; }
.help-links a strong { display: block; font: 700 22px/1.2 var(--display); margin-bottom: 4px; }
.help-links a span { color: var(--ink-2); font-size: 15px; }
.help-links a:hover strong { color: var(--pink-ink); }

/* Footer */
.site-footer { padding: 36px 0 48px; color: var(--ink-2); font-size: 14px; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }

/* Document pages: Privacy, Terms, Support. */
.doc-head { padding: 40px 0 28px; }
.doc-head h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; margin-bottom: 12px; }
.doc-head p { color: var(--ink-2); margin: 0; max-width: var(--measure); }
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-bottom: 72px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc h2 { font: 600 15px/1.4 var(--text); color: var(--ink-2); margin: 0 0 10px; }
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc li a:hover { color: var(--ink); border-left-color: var(--pink); }

.prose { max-width: var(--measure); }
.prose h2 { font-size: 30px; line-height: 1.15; margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 21px; line-height: 1.25; margin: 28px 0 8px; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--pink-ink); }
.prose .muted { color: var(--ink-2); }

.summary { background: var(--paper); border-radius: 24px; padding: 24px 28px; margin: 0 0 40px; border: 1px solid var(--line); }
.summary h2 { font-size: 24px; margin: 0 0 10px; }
.summary ul { margin: 0; }

.table { overflow-x: auto; margin: 16px 0 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
.table table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 15px; line-height: 1.5; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table th { font-weight: 600; }
.table td { color: var(--ink-2); }
.table td:first-child { color: var(--ink); font-weight: 500; }
.table tr:last-child td { border-bottom: 0; }

/* Support FAQ: native disclosure, no script. */
.support-body { max-width: 760px; padding: 32px 0 72px; }
.topics { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics a { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--chip); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.topics a:hover { background: var(--paper); }
.faq-group { margin-bottom: 44px; }
.faq-group > h2 { font-size: 30px; margin: 0 0 12px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 16px 40px 16px 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 22px; width: 9px; height: 9px;
  border-right: 2px solid var(--pink-ink); border-bottom: 2px solid var(--pink-ink); transform: rotate(45deg); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq details > div { padding: 0 0 18px; color: var(--ink-2); }
.faq details > div strong { color: var(--ink); }
.faq ol, .faq ul { padding-left: 1.25em; margin: 0 0 0.8em; }
.faq li { margin: 0.3em 0; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

.contact { border-radius: 28px; padding: 32px; background: var(--wallpaper); color: #2B2130; }
.contact h2 { color: #2B2130; font-size: 32px; margin-bottom: 8px; }
.contact p { max-width: 52ch; }
.contact a { color: #2B2130; font-weight: 600; }

/* 404 */
.lost { padding: 72px 0 96px; }
.lost .code { font: 800 clamp(96px, 18vw, 180px)/0.9 var(--display); color: var(--pink); margin: 0 0 12px; }
.lost h1 { font-size: 40px; margin-bottom: 10px; }
.lost p { color: var(--ink-2); }

@media (max-width: 920px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile-large { grid-column: span 4; grid-row: auto; }
  .ways { grid-template-columns: 1fr; gap: 36px; }
  .kinds { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .help-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .doc-head { padding: 16px 0 20px; }
  .support-body { padding-top: 20px; }
  .lost { padding-top: 32px; }
  .toc ol, .toc ul { columns: 2; column-gap: 12px; border-left: 0; }
  .toc li a { padding-left: 0; border-left: 0; }
  .table { border-radius: 18px; }
  .table table { min-width: 0; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; padding: 2px 0; border: 0; }
  .table td:first-child { font-size: 16px; margin-bottom: 4px; }
  .table td + td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 8px; }
  .site-header .wrap { min-height: 60px; }
  .brand span { display: none; }
  .nav a { padding: 8px 10px; }
  .screen { border-radius: 30px; }
  .tile-large .actions .btn { width: 100%; }
  .kinds li { grid-template-columns: 1fr; gap: 2px; }
  .help-links { grid-template-columns: 1fr; }
  .plan, .contact { padding: 24px; }
  .section { padding: 48px 0; }
}
