/* ==========================================================================
   Digiframe — site styles

   One stylesheet, no build step, no external requests. The palette is taken
   from the app's own `StandbyPalette.swift`, so the page and the product are
   visibly the same thing. Dark is the default because the product is a lit
   display; light mode is real, not an afterthought, because the privacy page
   is most often opened from a phone in a bright room.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --bg: #0b0b0f;
  --bg-elev: #141419;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.2);

  /* Text */
  --text: #f3f1ed;
  --text-dim: #aaa7a1;
  --text-faint: #78756f;

  /* Accent — StandbyPalette's amber colourway, warmest of the seven. */
  --accent-a: #f5c759;
  --accent-b: #e8736b;
  --accent-text: #f5c759;
  --accent-ink: #0b0b0f; /* text sitting on an accent fill */


  /* Metrics */
  --measure: 66ch;
  --radius: 18px;
  --radius-sm: 11px;
  --shell: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfaf7;
    --bg-elev: #ffffff;
    --surface: rgba(17, 16, 20, 0.035);
    --surface-strong: rgba(17, 16, 20, 0.06);
    --border: rgba(17, 16, 20, 0.12);
    --border-strong: rgba(17, 16, 20, 0.22);

    --text: #17161a;
    --text-dim: #56535c;
    --text-faint: #83808a;

    /* Darkened stops: the display-bright amber fails contrast on paper-white,
       so light mode gets its own pair rather than a washed-out compromise. */
    --accent-a: #c07d18;
    --accent-b: #c4453b;
    --accent-text: #b0431f;
    --accent-ink: #ffffff;

    color-scheme: light;
  }
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.15rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.12rem, 1.8vw, 1.3rem);
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1.1em;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

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

.section {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  border-top: 1px solid var(--border);
}

.section--plain {
  border-top: 0;
}

.section--tight-top {
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
}

.section__lede {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 1rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-elev);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.gradient-text {
  background: linear-gradient(115deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Fallback for anything that ignores background-clip. */
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   4. Header and footer
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 62px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.94rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav {
    gap: 1rem;
  }
  .nav a {
    font-size: 0.88rem;
  }
  .nav .nav__hide-sm {
    display: none;
  }
}

.footer {
  border-top: 1px solid var(--border);
  padding-block: 3rem 3.5rem;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer__note {
  margin-top: 2rem;
  color: var(--text-faint);
  font-size: 0.85rem;
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.82rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

/* Apple's "Download on the App Store" badge, used exactly as supplied: the
   artwork is Apple's trademark and must not be redrawn, recoloured, rotated or
   reproportioned. Height only — the width follows the file's 119.66x40 aspect.
   The black lockup carries its own grey outline, so it reads on both themes.
   Apple asks for clear space of at least 10% of the badge height around it,
   which the surrounding gap already exceeds. */
/* A screenshot leading a section, narrower than the section's full width so it
   does not overpower the cards under it. */
.section__shot {
  display: block;
  max-width: 720px;
  margin: 2.75rem auto 0;
}

.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 9px;
}

.badge img {
  height: 52px;
  width: auto;
}
/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
}

/* The warm wash behind the hero — the "lit display" the product is. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 20% 40% -20%;
  background: radial-gradient(
    50% 50% at 50% 50%,
    color-mix(in srgb, var(--accent-b) 26%, transparent),
    transparent 70%
  );
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -20% -25% 30% 45%;
  background: radial-gradient(
    50% 50% at 50% 50%,
    color-mix(in srgb, var(--accent-a) 22%, transparent),
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}

.hero__copy p {
  color: var(--text-dim);
  font-size: clamp(1.06rem, 1.9vw, 1.24rem);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center; /* the badge is taller than the ghost button beside it */
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero__meta {
  margin-top: 1.5rem;
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   7. Screenshots

   Real App Store captures, cropped to the device with the canvas around the
   bezel made transparent — so the rounded corners sit on either theme's
   background, and drop-shadow() follows the bezel rather than a rectangle.
   -------------------------------------------------------------------------- */

.shot {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.45));
}

@media (prefers-color-scheme: light) {
  .shot {
    filter: drop-shadow(0 24px 30px rgba(23, 22, 26, 0.22));
  }
}

/* --------------------------------------------------------------------------
   8. Cards and grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.75rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.96rem;
  margin: 0;
}

.card__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--accent-a) 28%, transparent),
    color-mix(in srgb, var(--accent-b) 20%, transparent)
  );
  border: 1px solid var(--border);
}

.card__icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-text);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Two-column feature block: copy beside a screenshot. */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split--flip .split__media {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   9. Spec list

   Name-and-detail rows, used for the three layouts and for the five per-album
   photo settings.
   -------------------------------------------------------------------------- */

.specs {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.specs li {
  display: grid;
  gap: 0.15rem 1.5rem;
  grid-template-columns: 1fr;
  padding: 1.15rem 1.4rem;
  background: var(--surface);
}

.specs li + li {
  border-top: 1px solid var(--border);
}

@media (min-width: 700px) {
  .specs li {
    grid-template-columns: 15rem 1fr;
    align-items: baseline;
  }
}

.specs__name {
  font-weight: 600;
}

.specs__detail {
  color: var(--text-dim);
  font-size: 0.96rem;
}

.specs__detail b {
  color: var(--text);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   11. Crop comparison
   -------------------------------------------------------------------------- */

.compare {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  margin-top: 2.25rem;
}

/* Whole Photo: the letterbox bars are the page's darkest ground in both themes,
   because that is what the app shows behind a fitted photo. Chained with
   .cropbox so it wins over that rule's background, which comes later in the
   file. */
.cropbox.cropbox--letterbox {
  background: #0b0b0f;
}

.compare__item figcaption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.compare__item figcaption b {
  color: var(--text);
  display: block;
  font-weight: 600;
}

.cropbox {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #101016;
}

/* --------------------------------------------------------------------------
   12. Pricing / Pro
   -------------------------------------------------------------------------- */

.tiers {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  margin-top: 2.5rem;
}

.tier {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
}

.tier--pro {
  border-color: color-mix(in srgb, var(--accent-a) 45%, var(--border));
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--accent-a) 9%, transparent),
    transparent 60%
  );
}

.tier h3 {
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
}

.tier__kicker {
  color: var(--text-dim);
  font-size: 0.94rem;
  margin-bottom: 1.35rem;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.62rem;
}

.ticks li {
  display: grid;
  grid-template-columns: 1.15rem 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: 0.97rem;
  color: var(--text-dim);
}

.ticks li b {
  color: var(--text);
  font-weight: 600;
}

.ticks svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  stroke: var(--accent-text);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terms {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.92rem;
}

.terms h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.terms p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   13. Changelog
   -------------------------------------------------------------------------- */

.changelog {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
}

.changelog li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.changelog li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-top: 0.62em;
  background: linear-gradient(120deg, var(--accent-a), var(--accent-b));
}

.changelog b {
  font-weight: 600;
}

.changelog span {
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   14. Prose pages (privacy, support)
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.page-head h1 {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  margin-bottom: 0.35rem;
}

.page-head__meta {
  color: var(--text-faint);
  font-size: 0.92rem;
  margin: 0;
}

.prose {
  max-width: var(--measure);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.prose h2 {
  font-size: clamp(1.28rem, 2.4vw, 1.6rem);
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.prose h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.prose h3 {
  font-size: 1.06rem;
  margin-top: 1.9rem;
}

.prose p,
.prose li {
  color: var(--text-dim);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.15rem;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.5em;
}

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-text);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1.25rem 1.4rem;
  margin: 0 0 2rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout strong {
  color: var(--text);
}

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  margin-bottom: 2.5rem;
}

.toc h2 {
  font-size: 0.78rem !important;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.85rem !important;
  padding: 0 !important;
  border: 0 !important;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 620px) {
  .toc ol {
    columns: 1;
  }
}

.toc li {
  margin-bottom: 0.35em;
  break-inside: avoid;
}

/* Data table in the privacy policy */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 1.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 30rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  white-space: nowrap;
}

td {
  color: var(--text-dim);
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

/* FAQ */
.faq {
  max-width: var(--measure);
  margin-top: 2rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 0.7rem;
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::before {
  transform: rotate(45deg);
}

.faq details > div {
  padding: 0 1.3rem 1.2rem 2.9rem;
  color: var(--text-dim);
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

/* Contact block */
.contact {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
  max-width: var(--measure);
}

.contact p:last-child {
  margin-bottom: 0;
}

.contact__addr {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
