/* Analogous — analogous.photos
   Plain CSS, no build step. Shared by index.html, privacy.html, support.html. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Ink and paper, taken from the app icon: deep teal, cream, amber. */
  --ink: #06363d;
  --ink-soft: #2c5258;
  --cream: #fff6e8;
  --paper: #fbefe0;
  --amber: #f4a50e;
  --teal: #0a5f64;
  --blush: #f6c9c4;
  --aqua: #bfe3dd;
  --apricot: #fbd3a8;

  --glass: rgba(255, 251, 244, 0.52);
  --glass-strong: rgba(255, 252, 247, 0.8);
  --glass-edge: rgba(255, 255, 255, 0.72);

  --font: "Bricolage Grotesque", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --gutter: clamp(1.125rem, 3.2vw, 2.75rem);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);

  color-scheme: light;
}

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

html {
  /* Static fallback. It is also what paints first, and what reduced-motion
     visitors without WebGL keep. */
  background-color: var(--paper);
  background-image:
    radial-gradient(110% 85% at 88% 8%, var(--aqua) 0%, rgba(191, 227, 221, 0) 58%),
    radial-gradient(85% 80% at 8% 96%, var(--blush) 0%, rgba(246, 201, 196, 0) 60%),
    radial-gradient(70% 70% at 72% 84%, var(--apricot) 0%, rgba(251, 211, 168, 0) 62%),
    linear-gradient(160deg, var(--cream), var(--paper));
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* ---------- Backdrop: light field, scrim, grain ---------- */

.field {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.field.is-live {
  opacity: 1;
}

/* Keeps the copy side of the frame calm enough to read against. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(255, 247, 236, 0.66) 0%,
    rgba(255, 247, 236, 0.34) 36%,
    rgba(255, 247, 236, 0) 64%
  );
}

/* Film grain, laid over the light so it stays crisp at any canvas resolution. */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.4  0 0 0 0 0.42  0.9 0 0 0 -0.28'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- Shared chrome: nav and footer ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: clamp(0.9rem, 2.2vh, 1.5rem) var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.22rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-radius: 12px;
}

.brand img {
  width: 2.4rem;
  height: 2.4rem;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(6, 54, 61, 0.22));
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 0.9rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.9rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 24px -12px rgba(6, 54, 61, 0.35);
  font-weight: 560;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.25s ease, transform 0.25s var(--ease);
}

.button:hover {
  background: rgba(255, 252, 247, 0.82);
}

.button:active {
  transform: scale(0.98);
}

/* App Store badge styling. Swap for Apple's official artwork and the real
   store URL once the app is live. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.9rem;
  padding: 0 1.05rem 0 0.9rem;
  border-radius: 0.8rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 10px 26px -12px rgba(6, 54, 61, 0.6);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.store:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 14px 30px -12px rgba(6, 54, 61, 0.7);
}

.store:active {
  transform: scale(0.98);
}

.store:focus-visible {
  outline-color: var(--ink);
  border-radius: 0.8rem;
}

.store svg {
  width: 1.3rem;
  height: 1.3rem;
  flex: none;
  fill: currentColor;
  transform: translateY(-0.06rem);
}

.store__text {
  display: grid;
  line-height: 1.05;
  white-space: nowrap;
}

.store__small {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

.store__big {
  font-size: 1.12rem;
  font-weight: 560;
  letter-spacing: -0.015em;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding: clamp(0.8rem, 1.8vh, 1.25rem) var(--gutter) clamp(0.9rem, 2.2vh, 1.5rem);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
}

.footer a {
  display: inline-block;
  padding: 0.3rem 0;
  text-decoration: none;
  color: var(--ink);
}

.footer a:hover {
  text-decoration: underline;
}

/* ---------- Landing page ---------- */

.home {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.hero {
  align-self: center;
  max-width: 46rem;
  padding: clamp(1rem, 4vh, 3rem) var(--gutter);
}

.hero__title {
  font-size: clamp(2.7rem, 4.2vw + 3.4vh, 6.2rem);
  font-weight: 420;
  line-height: 0.96;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.hero__title .line {
  display: block;
}

.hero__lede {
  max-width: 34rem;
  margin-top: clamp(1rem, 2.6vh, 1.75rem);
  font-size: clamp(1.06rem, 0.5vw + 0.95rem, 1.3rem);
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* A stand-in for the app's search field. Decorative: the queries echo the
   lede, and the light field takes its colors from whichever is showing. */
.search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 31rem);
  height: 3.6rem;
  margin-top: clamp(1.25rem, 3.2vh, 2.25rem);
  padding: 0 1.1rem 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 242, 0.46));
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -10px 18px -14px rgba(6, 54, 61, 0.25),
    0 22px 44px -22px rgba(6, 54, 61, 0.45);
}

.search__loupe {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}

.search__queries {
  position: relative;
  flex: 1;
  height: 100%;
  min-width: 0;
}

.search__queries li {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(0.5rem);
  filter: blur(4px);
  transition:
    opacity 0.55s ease,
    transform 0.7s var(--ease),
    filter 0.55s ease;
}

.search__queries li.is-current {
  opacity: 1;
  transform: none;
  filter: none;
}

.search__queries li.is-leaving {
  transform: translateY(-0.5rem);
}

.search__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 1.08rem;
  font-weight: 460;
  letter-spacing: -0.01em;
}

.search__kind {
  flex: none;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.search__swatch {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #4fa7a3;
  box-shadow: inset 0 0 0 1px rgba(6, 54, 61, 0.18);
}

.hero__hint {
  margin-top: 0.7rem;
  padding-left: 1.05rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.hero__note {
  margin-top: clamp(1rem, 2.6vh, 1.75rem);
  font-size: 0.98rem;
  color: var(--ink-soft);
  border-radius: 10px;
}

.hero__note a {
  color: var(--ink);
  font-weight: 560;
}

/* The nav badge points here until the store listing exists. */
.hero__note:target {
  animation: note-ping 1.8s ease 1;
}

@keyframes note-ping {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(244, 165, 14, 0);
    background-color: rgba(255, 255, 255, 0);
  }
  25% {
    box-shadow: 0 0 0 0.7rem rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.6);
  }
}

/* Feature list, set on one sheet of frosted glass like slides on a light table. */
.tray {
  margin: 0 var(--gutter);
  padding: clamp(1rem, 2.4vh, 1.6rem) clamp(1.1rem, 2vw, 1.9rem);
  border-radius: 1.5rem;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  backdrop-filter: blur(26px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 30px 60px -34px rgba(6, 54, 61, 0.45);
}

.tray ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vh, 1.4rem) clamp(1.1rem, 2.4vw, 2.5rem);
}

.tray h3 {
  font-size: 1.02rem;
  font-weight: 620;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

.tray p {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  line-height: 1.38;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* One page-load sequence, then the page is still. */
@media (prefers-reduced-motion: no-preference) {
  .home .nav,
  .hero__title .line,
  .hero__lede,
  .search,
  .hero__hint,
  .hero__note,
  .tray,
  .home .footer {
    animation: settle 1.1s var(--ease) both;
  }

  .hero__title .line:nth-child(1) { animation-delay: 0.08s; }
  .hero__title .line:nth-child(2) { animation-delay: 0.18s; }
  .hero__lede { animation-delay: 0.3s; }
  .search { animation-delay: 0.42s; }
  .hero__hint { animation-delay: 0.5s; }
  .hero__note { animation-delay: 0.56s; }
  .tray { animation-delay: 0.66s; }
  /* Opacity only: a translated footer would briefly lengthen the page. */
  .home .footer { animation-name: appear; animation-delay: 0.8s; }
  .hero__note:target { animation: note-ping 1.8s ease 1; }
}

@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ---------- Document pages: privacy, support, 404 ---------- */

.doc {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.doc .scrim {
  background: rgba(255, 247, 236, 0.3);
}

.sheet {
  width: min(100% - 2 * var(--gutter), 46rem);
  margin: clamp(0.75rem, 3vh, 2.5rem) auto clamp(1.5rem, 5vh, 3.5rem);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: 1.75rem;
  border: 1px solid var(--glass-edge);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  backdrop-filter: blur(26px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 40px 80px -48px rgba(6, 54, 61, 0.5);
}

.sheet h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  font-weight: 440;
  line-height: 1;
  letter-spacing: -0.04em;
}

.sheet__meta {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.sheet__lede {
  margin-top: 1.4rem;
  font-size: 1.24rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.sheet h2 {
  margin-top: 2.6rem;
  font-size: 1.5rem;
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: -0.022em;
}

.sheet h3 {
  margin-top: 1.8rem;
  font-size: 1.14rem;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.sheet {
  overflow-wrap: break-word;
}

.sheet p,
.sheet li {
  line-height: 1.62;
  color: #173f45;
}

.sheet p {
  margin-top: 0.85rem;
  max-width: 68ch;
}

.sheet h3 + p {
  margin-top: 0.4rem;
}

.sheet ul {
  margin-top: 0.85rem;
  padding-left: 1.2rem;
  list-style: disc;
  max-width: 66ch;
}

.sheet li + li {
  margin-top: 0.45rem;
}

.sheet li::marker {
  color: var(--amber);
}

.sheet a {
  font-weight: 560;
}

.sheet strong {
  font-weight: 640;
  color: var(--ink);
}

.contact {
  margin-top: 2.6rem;
  padding: 1.25rem 1.4rem;
  border-radius: 1.1rem;
  background: rgba(191, 227, 221, 0.42);
  border: 1px solid rgba(10, 95, 100, 0.14);
}

.contact h2 {
  margin-top: 0;
}

.contact p {
  margin-top: 0.4rem;
}

.contact__mail {
  font-size: clamp(1.02rem, 4.6vw, 1.24rem);
  overflow-wrap: anywhere;
}

.sheet__back {
  margin-top: 2.4rem;
  font-size: 0.98rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 68rem) {
  .tray ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 52rem) {
  .scrim {
    background: linear-gradient(180deg, rgba(255, 247, 236, 0.5), rgba(255, 247, 236, 0.3));
  }

  .hero {
    padding-top: clamp(2rem, 7vh, 4rem);
    padding-bottom: clamp(2rem, 6vh, 3.5rem);
  }

  .hero__title {
    font-size: clamp(2.6rem, 11.5vw, 4.6rem);
  }
}

@media (max-width: 34rem) {
  .tray ul {
    grid-template-columns: 1fr;
    gap: 1.05rem;
  }

  .tray {
    padding: 1.3rem 1.25rem;
  }

  /* Narrow screens: Support drops its pill so the wordmark still fits. */
  .nav {
    gap: 0.5rem;
  }

  .nav__actions {
    gap: 0.35rem;
  }

  .button {
    height: 2.7rem;
    padding: 0 0.4rem;
    border-color: transparent;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    font-weight: 620;
    font-size: 0.94rem;
  }

  .button:hover {
    background: none;
    text-decoration: underline;
  }

  .store {
    height: 2.7rem;
    gap: 0.4rem;
    padding: 0 0.6rem 0 0.5rem;
  }

  .store svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  .store__small {
    font-size: 0.58rem;
  }

  .store__big {
    font-size: 0.85rem;
  }

  .brand {
    font-size: 1rem;
    gap: 0.4rem;
  }

  .brand img {
    width: 2rem;
    height: 2rem;
  }

  .search__kind {
    display: none;
  }

  .footer {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
}

/* Short desktop windows (most 13-inch laptops): tighten the vertical rhythm
   so the whole page still sits in one screen. */
@media (min-width: 68.01rem) and (max-height: 57rem) {
  .nav {
    padding-block: 0.7rem;
  }

  .hero {
    max-width: 48rem;
    padding-block: 0.4rem 0.9rem;
  }

  .hero__title {
    font-size: clamp(2.7rem, 2vw + 6.2vh, 5.4rem);
  }

  .hero__lede {
    max-width: 42rem;
    margin-top: 0.85rem;
    font-size: 1.1rem;
  }

  .search {
    height: 3.25rem;
    margin-top: 1.1rem;
  }

  .hero__hint {
    margin-top: 0.45rem;
  }

  .hero__note {
    margin-top: 0.7rem;
  }

  .tray {
    padding-block: 0.9rem;
  }

  .tray ul {
    row-gap: 0.7rem;
  }

  .tray h3 {
    font-size: 0.98rem;
  }

  .tray p {
    font-size: 0.875rem;
    line-height: 1.34;
  }

  .footer {
    padding-block: 0.6rem 0.75rem;
  }
}

@media (min-width: 68.01rem) and (max-height: 46rem) {
  .hero__hint {
    display: none;
  }
}

/* Too narrow for mark, wordmark and both actions: keep the mark. */
@media (max-width: 23.3rem) {
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* The wheel hint only makes sense with a wheel or trackpad. */
@media (hover: none), (pointer: coarse) {
  .hero__hint {
    display: none;
  }
}

.no-js .hero__hint {
  display: none;
}

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

@media (prefers-reduced-transparency: reduce) {
  .button,
  .search,
  .tray,
  .sheet {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 252, 247, 0.94);
  }
}

@media print {
  .field,
  .scrim,
  .grain,
  .nav__actions {
    display: none;
  }

  html {
    background: #fff;
  }

  .sheet {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
}
