/* Karoto — main page. Measurements from the Figma "Main page" frame (1280 wide,
   a 984 column with 148 either side). */

:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #0b090a;
  --secondary: rgba(60, 60, 67, 0.6);
  --accent: #ff9230;
  --accent-wash: rgba(255, 146, 48, 0.2);
  --separator: #e6e6e6;
  --radius-card: 20px;
  --column: 984px;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--column), calc(100% - 32px));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  padding-top: 20px;
  border-bottom: 1px solid var(--separator);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.18px;
}
.brand img { width: 32px; height: 32px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16px;
}
.header-nav a:not(.button):hover { color: var(--accent); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 40px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  transition: filter 0.15s;
}
.button:hover { filter: brightness(1.06); }

/* ---------- Type ---------- */

.display {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
}

.eyebrow {
  font-size: 24px;
  font-weight: 700;
}

.title {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
}

.lead {
  font-size: 20px;
  font-weight: 500;
  color: var(--secondary);
}

.caption {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.hero-lead { max-width: 743px; }

/* Three phones, the middle one in front. */
.hero-frames {
  position: relative;
  width: min(557px, calc(100% - 32px));
  aspect-ratio: 557 / 510.92;
  margin-top: 48px;
}
.hero-frames .phone { position: absolute; }
.hero-right { left: 61.939%; top: 6.655%; width: 38.061%; height: 90.213%; }
.hero-left { left: 0; top: 6.655%; width: 38.061%; height: 90.213%; }
.hero-middle { left: 28.905%; top: 0; width: 42.191%; height: 100%; }

.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}
.download.download-left { align-items: flex-start; margin-top: 0; }

.app-store-badge img { width: 119.664px; height: 40px; }

/* ---------- Device frames ---------- */

/* A screenshot with its bezel drawn over it, a little larger. */
.phone { position: relative; }
.phone .screen,
.device-ipad .screen,
.device-mac .screen,
.device-iphone .screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The screen's own rounded corners, so none pokes past the frame when large. */
.phone .screen { border-radius: 14% / 6.44%; }

.phone .bezel,
.device-iphone .bezel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 111.94%;
  height: 105.263%;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ---------- Sections ---------- */

.sections {
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  gap: 140px;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 140px;
}

.stack-156 {
  display: flex;
  flex-direction: column;
  gap: 156px;
}

.feature-section {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.section-head {
  display: flex;
  flex-direction: column;
  max-width: 730px;
}
.section-head .title { margin-top: 4px; }
.section-head .lead { margin-top: 8px; }
.section-head-wide { max-width: none; }
.lead-narrow { max-width: 675px; }
.lead-devices { max-width: 732px; }

.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-more { row-gap: 72px; }

.feature {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 18px;
}
.feature-text h3 { font-size: 20px; font-weight: 700; }
.feature-text p { font-weight: 500; color: var(--secondary); }

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
}

/* A card showing the app: the phone centred, cropped where it runs off. */
.shot {
  position: relative;
  height: 480px;
  overflow: hidden;
  /* Clipped, never scrolled: focusing a phone that runs past the edge would
     otherwise scroll the card to it, and leave it there. */
  overflow: clip;
}
.shot > .phone,
.shot > .widget {
  position: absolute;
}
.shot-square { height: 476px; }

.phone-card {
  width: 190px;
  height: 413.085px;
  left: 50%;
  top: calc(50% - 0.46px);
  transform: translate(-50%, -50%);
}

/* Cook Mode's screenshots sit a little shorter in the frame. */
.phone-cook { height: 406px; top: 50%; }
.phone-cook .bezel { width: 110.173%; height: 105.409%; }

.phone-large {
  width: 325px;
  height: 706.592px;
  left: calc(50% + 0.5px);
  transform: translate(-50%, -50%);
}
.phone-show-bottom { top: calc(50% - 187.7px); }
.phone-show-top { top: calc(50% + 187.3px); }

.phone-live { transform: translate(-50%, -50%); }
.live-1 { width: 228px; height: 495.701px; left: 50%; top: calc(50% - 297.15px); }
.live-2 { width: 227px; height: 493.527px; left: calc(50% + 0.5px); top: calc(50% + 295.76px); }

/* The widget, cut from a Home Screen screenshot and tilted. */
.widget {
  width: 176px;
  height: 175px;
  border-radius: 29.67px;
  overflow: hidden;
  box-shadow: 0 0 20.23px 1.349px rgba(0, 0, 0, 0.25);
}
.widget img { position: absolute; max-width: none; }
.widget-1 {
  height: 175.326px;
  left: calc(50% - 127.05px);
  top: 49.975px;
  transform: rotate(-4deg);
}
.widget-1 img { width: 247.13%; height: 537.69%; left: -16.86%; top: -49.23%; }
.widget-2 {
  left: calc(50% - 51px);
  top: 262.05px;
  transform: rotate(5deg);
}
.widget-2 img { width: 248.08%; height: 539.77%; left: -17.11%; top: -49.46%; }

/* ---------- Screenshots that open large ---------- */

[data-zoom] {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
/* Lifted a little on hover, on top of each one's own placing. */
.shot > .phone[data-zoom]:hover { transform: translate(-50%, calc(-50% - 6px)); }
.widget-1[data-zoom]:hover { transform: rotate(-4deg) translateY(-6px); }
.widget-2[data-zoom]:hover { transform: rotate(5deg) translateY(-6px); }
[data-zoom]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
  border-radius: 28px;
}

.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  background: rgba(11, 9, 10, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lightbox.is-visible { opacity: 1; }

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox.is-visible .lightbox-figure { transform: none; }

/* The screenshot at its own 1290 × 2796, as tall as the window allows. */
.lightbox-phone {
  height: min(calc(100vh - 140px), 820px);
  height: min(calc(100dvh - 140px), 820px);
  aspect-ratio: 190 / 413.085;
}

.lightbox-caption {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.lightbox-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.15s;
}
.lightbox-button:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
}

@media (max-width: 640px) {
  .lightbox { gap: 8px; padding: 16px 8px; }
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; }
  .lightbox-phone {
    height: auto;
    width: min(calc(100vw - 120px), calc((100dvh - 160px) * 0.46));
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-zoom],
  .lightbox,
  .lightbox-figure { transition: none; }
}

/* ---------- And more ---------- */

.mini {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.badge-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: #fff;
  font-size: 24px;
}

/* ---------- Devices ---------- */

.devices-section { gap: 72px; }

/* The Mac's bezel reaches 9.25% of the group's width past its left edge, so
   on narrow screens the group shrinks and moves right to keep it in. */
.devices {
  position: relative;
  width: min(875px, 91.53%);
  aspect-ratio: 875 / 447.856;
  margin-left: max(calc((100% - 875px) / 2), 8.47%);
}
.devices > div { position: absolute; }

/* The iPad stands upright: its landscape bezel turned a quarter. */
.device-ipad { left: 51.657%; top: 0; width: 34.286%; height: 97.186%; }
.device-ipad .bezel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 158.27%;
  height: 77.69%;
  max-width: none;
  transform: translate(-50%, -50%) rotate(90deg);
  pointer-events: none;
}

.device-mac { left: 0; top: 13.84%; width: 60.8%; height: 77.15%; }
.device-mac .bezel {
  position: absolute;
  left: -15.21%;
  top: -15.27%;
  width: 130.42%;
  height: 130.54%;
  max-width: none;
  pointer-events: none;
}

.device-iphone { left: 84.343%; top: 33.493%; width: 15.657%; height: 66.507%; }
.device-iphone .screen { border-radius: 12px; }

/* ---------- Free, private, and yours ---------- */

.privacy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promise {
  min-height: 276px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.promise-icon { font-size: 40px; color: var(--accent); }
.promise .feature-text p { font-size: 18px; }

.footnote {
  font-size: 16px;
  color: var(--secondary);
}
.footnote a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-position: from-font;
}

/* ---------- FAQ ---------- */

.faq {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--separator);
}
.faq-item:last-child { padding-bottom: 0; border-bottom: 0; }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { font-size: 24px; flex-shrink: 0; }
.faq-item .faq-open { display: none; }
.faq-item[open] .faq-open { display: block; }
.faq-item[open] .faq-closed { display: none; }

.faq-item p {
  margin-top: 12px;
  padding-right: 24px;
  font-size: 20px;
  color: var(--secondary);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}
.more-link i { font-size: 24px; }
.more-link:hover { text-decoration: underline; }

/* ---------- Download band ---------- */

.cta {
  height: 552px;
  overflow: hidden;
  background: var(--accent-wash);
}

.cta-inner {
  position: relative;
  height: 100%;
}

.cta-text {
  position: absolute;
  left: 0;
  top: calc(50% + 0.5px);
  transform: translateY(-50%);
  width: 510px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.cta-text .section-head { max-width: none; }

.cta-phone {
  position: absolute;
  left: 588px;
  top: 88.14px;
}
.cta-phone .phone { width: 334px; height: 726.159px; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 120px;
  padding-bottom: 48px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}

.brand-large {
  gap: 12px;
  font-size: 24px;
  letter-spacing: 0.24px;
}
.brand-large img { width: 44px; height: 44px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary);
}
.footer-nav a:hover { color: var(--text); }

.separator { border-top: 1px solid var(--separator); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  font-size: 16px;
  color: var(--secondary);
}

/* ---------- Legal pages ---------- */

.legal {
  padding-top: 78px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-title h1 {
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 800;
}

.legal-date {
  font-size: 18px;
  font-weight: 600;
  color: rgba(60, 60, 67, 0.55);
}

.legal-summary {
  font-size: 20px;
  font-weight: 700;
  color: #1b140f;
}

.legal-sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
  color: #000;
}

.legal-sections section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-sections h2 {
  font-size: 28px;
  font-weight: 800;
}

.legal-sections p,
.legal-sections li {
  font-size: 18px;
  font-weight: 400;
  line-height: 27px;
}

.legal-sections ul {
  margin: 0;
  padding-left: 27px;
}
.legal-sections li + li { margin-top: 10px; }

.legal-sections strong { font-weight: 700; }

/* A section and the short list under it, closer together. */
.legal-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.legal-sub { gap: 10px; }
.legal-sub h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 27px;
}

/* A list under an introduction, a line below it and indented further. */
.legal-sections .legal-list-indented {
  margin-top: 27px;
  padding-left: 54px;
}

.legal-sections a {
  text-decoration: underline;
  text-underline-position: from-font;
}
.legal-sections a:hover { color: var(--accent); }

/* ---------- Help Center ---------- */

.help {
  width: min(720px, calc(100% - 32px));
  margin-inline: auto;
  padding-top: 78px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.help-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.help-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.help-intro h1 {
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 800;
}
.help-intro p {
  font-size: 20px;
  font-weight: 600;
  color: var(--secondary);
}

/* The search field sits 40 below the intro, the chips 48 below it. */
.help-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  margin-top: -8px;
  padding: 13px 21px;
  background: var(--surface);
  border: 1px solid rgba(27, 20, 15, 0.08);
  border-radius: 9999px;
  cursor: text;
}
.help-search i { font-size: 19px; color: rgba(60, 60, 67, 0.45); }
.help-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.help-search input::placeholder { color: rgba(60, 60, 67, 0.45); }
.help-search:focus-within { border-color: var(--accent); }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 618px;
}

.chip {
  padding: 8px 16px;
  border: 1px solid #000;
  border-radius: 20px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.chip:hover { background: rgba(0, 0, 0, 0.05); }
.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.help-sections {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.help-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 24px;
}
.help-section h2,
.help-contact h2 {
  font-size: 24px;
  font-weight: 700;
}

.help-section .faq-item:not([hidden]):last-of-type { padding-bottom: 0; border-bottom: 0; }
.help-section .faq-item a,
.help-empty a,
.help-contact a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-position: from-font;
}

.help-empty {
  font-size: 20px;
  color: var(--secondary);
  text-align: center;
}

.help-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-card);
}
.help-contact p {
  font-size: 20px;
  color: var(--secondary);
}

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
  /* Stacked, each card sits close to its own text and apart from the next. */
  .grid-3,
  .grid-2 { row-gap: 64px; }
  .grid-more { row-gap: 48px; }
  .feature { gap: 16px; }
  .sections,
  .section-stack { gap: 96px; }
  .stack-156 { gap: 96px; }

  .cta { height: auto; }
  .cta-inner { height: auto; padding-top: 64px; }
  .cta-text {
    position: static;
    transform: none;
    width: auto;
    align-items: center;
    text-align: center;
  }
  .download.download-left { align-items: center; }
  .cta-phone {
    position: relative;
    left: auto;
    top: auto;
    height: 400px;
    margin-top: 40px;
    /* Room above for the frame, which stands a little proud of the screen. */
    padding-top: 20px;
    overflow: hidden;
  }
  .cta-phone .phone { width: 260px; height: 565.3px; margin-inline: auto; }

  .footer-top,
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .header-nav a:not(.button) { display: none; }
  .hero { padding-top: 32px; }
  .legal,
  .help { padding-top: 48px; }
  .chips { gap: 10px; }
  .help-contact p { font-size: 18px; }
  .legal-sections h2 { font-size: 24px; }
  .hero-frames { margin-top: 32px; }
  .download { margin-top: 32px; }
  .eyebrow { font-size: 20px; }
  .lead,
  .feature-text,
  .feature-text h3,
  .faq-item summary,
  .faq-item p,
  .more-link,
  .footer-nav,
  .footer-bottom { font-size: 18px; }
  .footer-nav { gap: 20px; }
}
