/* PhotoChopper website. Tokens mirror Projects/DesignSystem (Palette.swift,
   DesignSystemTokens.swift, Typography.swift). The app's palette is light
   only (CardSurface pins glass to the light appearance), so the site is too. */

@font-face { font-family: "Chakra Petch"; font-weight: 400; font-display: swap; src: url("../fonts/ChakraPetch-Regular.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("../fonts/ChakraPetch-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("../fonts/ChakraPetch-Bold.woff2") format("woff2"); }
@font-face { font-family: "Major Mono Display"; font-weight: 400; font-display: swap; src: url("../fonts/MajorMonoDisplay-Regular.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ink: #2a1155;
  --sub: #6a4f8e;
  --ground: #fff2e8;
  --surface: #ffffff;
  --accent: #ff8fb8;
  --accent-deep: #b03244;
  --secondary: #8b7cff;
  --tertiary: #7cf0c2;
  --warn: #ff5468;
  --ok-deep: #2e6e4a;
  --keep-bright: #7ed38a;
  --mango: #ffd27a;
  --peach: #ffb08f;
  --accent-gradient: linear-gradient(135deg, var(--accent), var(--secondary));
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --gutter: 16px;
  --max: 1080px;
  --font: "Chakra Petch", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Major Mono Display", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--ground);
  /* SunsetGridBackground: 1pt ink dots at 5% on a 14pt grid. */
  background-image: radial-gradient(rgba(42, 17, 85, 0.07) 1px, transparent 1.2px);
  background-size: 14px 14px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); z-index: 10; }
.skip-link:focus { left: var(--gutter); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: lowercase; color: var(--sub); }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(40px, 9vw, 64px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 6vw, 40px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 700; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(18px, 3.6vw, 21px); color: var(--sub); max-width: 36ch; }

/* Header */
.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: -0.035em; color: var(--ink); }
.wordmark img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--sub); padding: 8px 10px; border-radius: 999px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, 0.6); }

/* Glass card: CardSurface (white 60% tint, radius lg). */
.card {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(42, 17, 85, 0.08);
  padding: 20px;
}
@media (prefers-reduced-transparency: reduce) { .card { background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* Hero */
.hero { padding: 24px 0 48px; }
.hero .wrap { display: grid; gap: 36px; align-items: center; }
.hero h1 { white-space: pre-line; }
.badge-link { display: inline-block; margin-top: 10px; border-radius: 10px; }
.badge-link img { height: 54px; width: auto; }
.hero-note { margin-top: 12px; font-size: 14px; color: var(--sub); }

.fan { position: relative; height: 330px; max-width: 420px; width: 100%; margin: 0 auto; }
.fan figure { position: absolute; margin: 0; top: 40px; left: 50%; width: 132px; aspect-ratio: 116 / 152; border-radius: var(--radius-md); overflow: hidden; border: 4px solid #fff; box-shadow: 0 14px 30px rgba(42, 17, 85, 0.18); background: var(--peach); }
.fan figure img { width: 100%; height: 100%; object-fit: cover; }
.fan .c1 { transform: translateX(-50%) translateX(-150px) translateY(34px) rotate(-22deg); }
.fan .c2 { transform: translateX(-50%) translateX(-78px) translateY(8px) rotate(-10deg); }
.fan .c4 { transform: translateX(-50%) translateX(78px) translateY(8px) rotate(10deg); }
.fan .c5 { transform: translateX(-50%) translateX(150px) translateY(34px) rotate(22deg); }
.fan .c3 { width: 164px; top: 14px; transform: translateX(-50%); z-index: 2; }
.verdict { position: absolute; z-index: 3; bottom: 18px; font-weight: 700; font-size: 16px; padding: 8px 16px; border-radius: 999px; color: #fff; box-shadow: 0 8px 18px rgba(42, 17, 85, 0.18); }
.verdict.chop { left: 6%; background: var(--accent-deep); transform: rotate(-6deg); }
.verdict.keep { right: 6%; background: var(--ok-deep); transform: rotate(6deg); }

@media (max-width: 400px) {
  .fan { height: 290px; }
  .fan figure { width: 108px; }
  .fan .c3 { width: 138px; }
  .fan .c1 { transform: translateX(-50%) translateX(-118px) translateY(30px) rotate(-22deg); }
  .fan .c2 { transform: translateX(-50%) translateX(-62px) translateY(8px) rotate(-10deg); }
  .fan .c4 { transform: translateX(-50%) translateX(62px) translateY(8px) rotate(10deg); }
  .fan .c5 { transform: translateX(-50%) translateX(118px) translateY(30px) rotate(22deg); }
}

@media (min-width: 860px) {
  .hero { padding: 48px 0 72px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; }
  .fan { height: 380px; max-width: 480px; }
  .fan figure { width: 150px; }
  .fan .c3 { width: 186px; }
}

/* Screenshot strip (hidden until images are dropped into assets/screens/). */
.screens { padding: 8px 0 40px; }
.screens-strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 16px; margin: 0 calc(-1 * var(--gutter)); }
.screens-strip img { flex: 0 0 auto; width: 220px; border-radius: var(--radius-xl); scroll-snap-align: center; box-shadow: 0 14px 30px rgba(42, 17, 85, 0.15); }

/* Sections */
section { scroll-margin-top: 16px; }
.section { padding: 48px 0; }
.section-head { max-width: 40rem; margin-bottom: 24px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid.two { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }

.feature h3 { display: flex; align-items: center; gap: 10px; }
.feature p { color: var(--sub); margin-bottom: 0; }
.chip { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-gradient); color: #fff; flex: 0 0 auto; }
.chip svg { width: 22px; height: 22px; }
.thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0 4px; }
.thumbs figure { margin: 0; position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--peach); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--ink); }
.thumbs .best figcaption { background: var(--ok-deep); color: #fff; }

/* Swipe demo */
.swipe { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .swipe { grid-template-columns: 1fr 1fr; } }
.swipe-card { position: relative; width: min(280px, 80%); margin: 0 auto; aspect-ratio: 116 / 152; border-radius: var(--radius-xl); overflow: hidden; border: 6px solid #fff; box-shadow: 0 20px 40px rgba(42, 17, 85, 0.2); transform: rotate(-4deg); }
.swipe-card img { width: 100%; height: 100%; object-fit: cover; }
.swipe-hints { display: flex; justify-content: space-between; max-width: 340px; margin: 18px auto 0; font-weight: 700; }
.swipe-hints .chop { color: var(--accent-deep); }
.swipe-hints .keep { color: var(--ok-deep); }
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps b { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }

/* Privacy band */
.privacy-band { background: var(--ink); color: #fff; border-radius: var(--radius-xl); padding: 32px 22px; position: relative; overflow: hidden; }
.privacy-band::after { content: ""; position: absolute; inset: auto -60px -80px auto; width: 260px; height: 260px; border-radius: 50%; background: var(--accent-gradient); opacity: 0.35; filter: blur(10px); }
.privacy-band h2 { color: #fff; }
.privacy-band .mono { color: var(--tertiary); }
.privacy-band p, .privacy-band li { color: rgba(255, 255, 255, 0.86); }
.privacy-band a { color: #fff; text-decoration-color: var(--tertiary); }
.privacy-band ul { padding-left: 20px; margin: 0 0 16px; display: grid; gap: 8px; position: relative; z-index: 1; }
@media (min-width: 860px) { .privacy-band { padding: 48px; } }

/* CTA */
.cta { text-align: center; padding: 56px 0 64px; }
.cta img.app-icon { width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 20px; box-shadow: 0 12px 28px rgba(139, 124, 255, 0.35); }
.cta .lead { margin: 0 auto 8px; }

/* Legal / text pages */
.doc { padding: 16px 0 56px; }
.doc .card { padding: 24px 20px; max-width: 760px; }
@media (min-width: 700px) { .doc .card { padding: 40px 44px; } }
.doc h1 { font-size: clamp(34px, 7vw, 48px); }
.doc h2 { font-size: 24px; margin-top: 32px; }
.doc h3 { font-size: 19px; margin-top: 20px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .meta { color: var(--sub); font-size: 15px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(42, 17, 85, 0.12); }
.doc th { font-weight: 700; }
.mail-button { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 28px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; box-shadow: 0 5px 0 var(--secondary), 0 14px 22px rgba(42, 17, 85, 0.25); }
.mail-button:hover { color: #fff; filter: brightness(1.04); }

/* Footer */
.site-footer { padding: 28px 0 40px; border-top: 1px solid rgba(42, 17, 85, 0.1); font-size: 15px; color: var(--sub); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--sub); }
.site-footer small { font-size: 13px; display: block; margin-top: 4px; }

/* In-page App Store bar for iOS browsers without Smart App Banners. */
.get-app { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 12px 30px rgba(42, 17, 85, 0.2); }
.get-app[hidden] { display: none; }
.get-app img.icon { width: 40px; height: 40px; border-radius: 10px; }
.get-app .text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.get-app .text b { display: block; font-size: 15px; }
.get-app .open { text-decoration: none; font-weight: 700; color: #fff; background: var(--ink); padding: 8px 14px; border-radius: 999px; font-size: 15px; white-space: nowrap; }
.get-app .close { appearance: none; border: 0; background: transparent; color: var(--sub); width: 36px; height: 36px; border-radius: 999px; font-size: 22px; line-height: 1; cursor: pointer; font-family: inherit; }

.not-found { text-align: center; padding: 64px 0 80px; }
.not-found .app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; }

/* Phone header: wordmark + two links on one line; Terms stays in the footer. */
@media (max-width: 479px) {
  .wordmark { font-size: 20px; }
  .site-nav { flex-wrap: nowrap; gap: 0; }
  .site-nav a { padding: 8px 8px; }
  .site-nav .wide-only { display: none; }
}

/* Rotated fan cards must never widen the page on the narrowest phones. */
.hero { overflow: hidden; }
@media (max-width: 359px) {
  .fan .c1 { transform: translateX(-50%) translateX(-96px) translateY(30px) rotate(-18deg); }
  .fan .c5 { transform: translateX(-50%) translateX(96px) translateY(30px) rotate(18deg); }
  .fan .c2 { transform: translateX(-50%) translateX(-50px) translateY(8px) rotate(-8deg); }
  .fan .c4 { transform: translateX(-50%) translateX(50px) translateY(8px) rotate(8deg); }
}
@media (max-width: 359px) {
  .wordmark { font-size: 18px; }
  .site-nav a:first-child { display: none; }
}
html { background-color: var(--ground); }
