/*
 * IMAGO — site.
 *
 * As cores são as da app (`ImagoColors`, core/designsystem) e da marca (Docs/BRAND_IDENTITY.md).
 * O dourado tem um só significado, o mesmo que na app: marca o que foi editado. Não decora.
 */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #0b0d0f;
  --bg-deep: #070809;
  --surface: #111417;
  --surface-raised: #171b1f;
  --nav: #1d2227;
  --ivory: #e6e6e3;
  --white: #f5f5f2;
  --gold: #d4af37;
  --danger: #ff4d4f;
  --ink: rgb(255 255 255 / 0.96);
  --ink-2: rgb(255 255 255 / 0.68);
  --ink-3: rgb(255 255 255 / 0.46);
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1240px;
  --section: clamp(96px, 14vw, 200px);

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-color: rgb(255 255 255 / 0.3);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 180ms var(--ease), color 180ms var(--ease);
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ivory);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.section-title {
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 350;
  color: var(--ivory);
}

.lede {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}

.frame-no {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--bg);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}

.button:hover {
  background: var(--white);
}

.button:active {
  transform: scale(0.98);
}

.link-arrow {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.link-arrow::after {
  content: " →";
}

.link-arrow:hover {
  border-color: var(--ivory);
}

.shot {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #000;
}

.footnote {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 36em;
}

mark.todo {
  background: none;
  color: var(--gold);
  outline: 1px dashed var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
  padding: 0 4px;
}

/* --- Cabeçalho ---------------------------------------------------------------------------- */

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
  border-bottom: 1px solid transparent;
}

.masthead[data-solid],
.page-doc .masthead {
  background: rgb(11 13 15 / 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}

.masthead__inner {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.masthead__logo {
  color: var(--ivory);
  width: 112px;
  flex: none;
}

.masthead__logo svg {
  width: 100%;
  height: auto;
}

.masthead__nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
  font-size: 15px;
}

.masthead__nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 0;
}

.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  color: var(--ink);
}

.masthead__nav .masthead__lang {
  padding-left: clamp(16px, 2.4vw, 32px);
  border-left: 1px solid var(--line-strong);
}

@media (max-width: 720px) {
  .masthead__nav a[href*="#"] {
    display: none;
  }
}

/* A sugestão de língua: uma linha por baixo do cabeçalho, só para quem tem o navegador na outra. */
.lang-hint {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: rgb(23 27 31 / 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong);
  font-size: 14px;
  color: var(--ink-2);
}

.lang-hint[hidden] {
  display: none;
}

.lang-hint a {
  color: var(--ink);
  margin-left: 6px;
}

.lang-hint button {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
}

.lang-hint button:hover {
  background: var(--line);
  color: var(--ink);
}

.lang-hint svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 380px) {
  .masthead__logo {
    width: 92px;
  }

  .masthead__nav {
    gap: 14px;
    font-size: 14px;
  }
}

/* --- Abertura ----------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: start;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__photo,
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* A caravana está no terço esquerdo e abaixo do meio da fotografia: o corte segue-a nos ecrãs
     estreitos e, nos baixos, corta por baixo para ela ficar abaixo do texto. */
  object-position: 15% 0%;
}

.hero__canvas {
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

.hero[data-live] .hero__canvas {
  opacity: 1;
}

.hero[data-live] .hero__photo {
  visibility: hidden;
}

.hero__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 22% 32%, rgb(7 8 9 / 0.5), transparent 75%),
    linear-gradient(to bottom, rgb(7 8 9 / 0.62), rgb(7 8 9 / 0.18) 38%, transparent 55%),
    linear-gradient(to top, rgb(7 8 9 / 0.7), transparent 28%);
  pointer-events: none;
}

.hero__copy {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin: 0 auto;
  padding-top: clamp(112px, 15vh, 160px);
}

.hero__kicker {
  margin-bottom: clamp(16px, 2.4vh, 24px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
}

.hero__kicker a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / 0.4);
}

.hero h1 {
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 300;
  color: var(--white);
}

.hero__lede {
  margin-top: clamp(20px, 3vh, 32px);
  max-width: 30em;
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.82);
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.hero__status {
  color: var(--ink-2);
  font-size: 15px;
  text-decoration: none;
}

.hero__status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  vertical-align: 2px;
  background: var(--gold);
}

.hero__exif {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgb(255 255 255 / 0.5);
  font-variant-numeric: tabular-nums;
}

.hero__recipe {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  bottom: clamp(56px, 8vh, 96px);
  width: 276px;
  padding: 16px 18px 12px;
  border-radius: 20px;
  background: rgb(17 20 23 / 0.72);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  font-size: 14px;
}

.hero__recipe-head {
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.hero__recipe-head span {
  color: var(--ink-3);
  font-weight: 400;
  margin-right: 6px;
}

.hero__recipe-list,
.immich__rows {
  margin: 0;
}

.hero__recipe-list > div,
.immich__rows > div {
  padding: 6px 0 8px;
}

.hero__recipe-list .row-head,
.immich__rows .row-head {
  display: flex;
  justify-content: space-between;
}

.hero__recipe-list dt,
.immich__rows dt {
  color: var(--ink-2);
}

.hero__recipe-list dd,
.immich__rows dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  transition: color 200ms var(--ease);
}

.hero__recipe-list dd[data-changed],
.immich__rows dd[data-changed] {
  color: var(--gold);
}

.mini-track {
  position: relative;
  height: 2px;
  margin-top: 8px;
  background: var(--line-strong);
  border-radius: 1px;
}

.mini-track i {
  position: absolute;
  top: 0;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

.mini-track b {
  position: absolute;
  top: -5px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: rgb(0 0 0 / 0.28);
}

@media (max-width: 900px) {
  .hero__recipe {
    display: none;
  }
}

/* --- Immich --------------------------------------------------------------------------------- */

.immich {
  padding-block: var(--section);
  background:
    radial-gradient(ellipse 70% 60% at 78% 40%, rgb(255 255 255 / 0.035), transparent 70%),
    var(--bg);
}

.immich__layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.immich__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.immich__kicker svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.immich .lede {
  margin-top: 24px;
}

.immich__points {
  margin: clamp(32px, 4vw, 48px) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.immich__points > div {
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}

.immich__points dt {
  font-weight: 500;
  color: var(--ivory);
}

.immich__points dd {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* O palco: a grelha do servidor à esquerda, o telemóvel à direita, e os três passos por baixo. */
.immich__stage {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}

.immich__server {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.immich__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink);
}

.immich__bar svg {
  width: 16px;
  height: 16px;
  fill: var(--ink-2);
}

.immich__host {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

.immich__photos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.immich__photos li {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}

.immich__photos img,
.immich__photos canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 300ms var(--ease), opacity 300ms var(--ease);
}

/* A que vai sair: marcada a marfim — o dourado é só para o que já foi editado. */
.immich__photos li[data-picked] {
  box-shadow: 0 0 0 2px var(--ivory);
  transform: scale(0.96);
}

/* Empilhada: a cópia revelada por cima, o original a espreitar por baixo. */
.immich__photos li[data-stacked] img {
  transform: translate(4px, -4px);
  opacity: 0.55;
}

.immich__photos li[data-stacked] canvas {
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.5);
  animation: immich-land 420ms var(--ease);
}

.immich__photos li[data-stacked]::after {
  content: "2";
  position: absolute;
  left: 5px;
  bottom: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgb(0 0 0 / 0.66);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

/* Editada: o quadrado dourado, o mesmo sinal que a app usa para o que mudou. */
.immich__photos li[data-stacked]::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 7px;
  height: 7px;
  background: var(--gold);
}

@keyframes immich-land {
  from {
    transform: scale(1.08);
  }
}

.immich__phone {
  padding: 8px;
  border-radius: 30px;
  background: var(--bg-deep);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.45);
}

.immich__screen {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 22px 22px 8px 8px;
  overflow: hidden;
  background: var(--bg-deep);
}

.immich__screen img,
.immich__screen canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.immich__screen canvas {
  opacity: 0;
  transition: opacity 240ms var(--ease);
}

.immich__stage[data-ready] .immich__still {
  display: none;
}

.immich__phone[data-live] canvas {
  opacity: 1;
}

.immich__panel {
  padding: 12px 10px 4px;
  font-size: 13px;
  min-height: 176px;
}

.immich__recipe {
  font-weight: 500;
  margin-bottom: 4px;
}

.immich__recipe span {
  color: var(--ink-3);
  font-weight: 400;
  margin-right: 4px;
}

.immich__recipe b {
  font-weight: 500;
}

.immich__stage figcaption {
  grid-column: 1 / -1;
}

.immich__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  font-size: 14px;
  color: var(--ink-3);
}

.immich__steps li {
  border-top: 1px solid var(--line-strong);
  padding-top: 10px;
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
}

.immich__steps li[data-current] {
  color: var(--ink);
  border-color: var(--ivory);
}

.immich__steps .frame-no {
  display: block;
  margin-bottom: 2px;
}

/* A fotografia a caminho entre o servidor e o telemóvel. */
.immich__ghost {
  position: fixed;
  z-index: 40;
  margin: 0;
  object-fit: cover;
  transform-origin: 0 0;
  pointer-events: none;
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.55);
}

@media (max-width: 1000px) {
  .immich__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .immich__stage {
    grid-template-columns: 1fr;
  }

  .immich__phone {
    width: min(100%, 280px);
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .immich__points {
    grid-template-columns: 1fr;
  }

  .immich__steps {
    font-size: 12px;
    gap: 10px;
  }

  .immich__panel {
    min-height: 150px;
    font-size: 12px;
  }
}

/* --- Do disparo à imagem ------------------------------------------------------------------ */

.flow {
  padding-block: var(--section) calc(var(--section) * 0.7);
}

.flow__steps {
  list-style: none;
  margin: clamp(56px, 8vw, 104px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 64px);
}

.flow__step:nth-child(2) {
  margin-top: 96px;
}

.flow__step:nth-child(3) {
  margin-top: 192px;
}

.flow__step figure {
  margin: 0;
}

.flow__text {
  margin-top: 28px;
}

.flow__text h3 {
  margin-top: 10px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.flow__text p {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 16px;
}

@media (max-width: 860px) {
  .flow__steps {
    grid-template-columns: 1fr;
    gap: 72px;
  }

  .flow__step:nth-child(n) {
    margin-top: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    gap: 20px;
    align-items: end;
  }

  .flow__text {
    margin: 0;
  }
}

@media (max-width: 520px) {
  .flow__step:nth-child(n) {
    grid-template-columns: 1fr;
  }

  .flow__step figure {
    width: 74%;
  }
}

/* --- Editor interactivo ------------------------------------------------------------------- */

.editor-demo {
  padding-block: calc(var(--section) * 0.6) var(--section);
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgb(255 255 255 / 0.035), transparent 70%),
    var(--bg);
}

.editor-demo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}

.editor-demo__intro .lede {
  margin-top: 28px;
}

.gestures {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  max-width: 34em;
}

.gestures li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 16px;
}

.gestures strong {
  color: var(--ink);
  font-weight: 500;
}

.picker {
  margin: 36px 0 28px;
  padding: 0;
  border: 0;
  display: flex;
  gap: 12px;
}

.picker legend {
  padding: 0;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--ink-3);
}

.picker label {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
}

.picker input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.picker img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 180ms var(--ease), border-color 180ms var(--ease);
}

.picker input:checked + img {
  border-color: var(--white);
  opacity: 1;
}

.picker label:hover img {
  opacity: 1;
}

.picker input:focus-visible + img {
  outline: 2px solid var(--ivory);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .editor-demo__grid {
    grid-template-columns: 1fr;
  }

  .editor-demo__device {
    justify-self: center;
  }
}

/* --- Folha de contactos -------------------------------------------------------------------- */

.sheet {
  padding-block: var(--section);
  background: var(--bg-deep);
  border-block: 1px solid var(--line);
}

.sheet__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
}

.sheet__frames {
  list-style: none;
  margin: clamp(56px, 7vw, 96px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 40px);
}

.frame figure {
  margin: 0 0 16px;
}

.frame .shot {
  border-radius: 16px;
}

.frame h3 {
  margin-top: 6px;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ivory);
}

.frame p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.sheet__also {
  margin: clamp(72px, 9vw, 120px) 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px clamp(20px, 3vw, 40px);
}

.sheet__also > div {
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}

.sheet__also dt {
  font-weight: 500;
  color: var(--ink);
}

.sheet__also dd {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 1000px) {
  .sheet__frames,
  .sheet__also {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sheet__head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .sheet__frames {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 12px;
    scrollbar-width: none;
  }

  .frame {
    flex: 0 0 68%;
    scroll-snap-align: start;
  }

  .sheet__also {
    grid-template-columns: 1fr;
  }
}

/* --- Ecrã largo ---------------------------------------------------------------------------- */

.wide {
  padding-block: var(--section) calc(var(--section) * 0.6);
}

.wide__text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
}

.wide__shot {
  margin: clamp(48px, 6vw, 80px) 0 0;
}

.wide__shot .shot {
  border-radius: 18px;
}

.wide__shot--second {
  width: 72%;
  margin-left: auto;
  margin-top: clamp(24px, 3vw, 40px);
}

@media (max-width: 760px) {
  .wide__text {
    grid-template-columns: 1fr;
  }

  .wide__shot--second {
    width: 100%;
  }

  .wide__shot .shot {
    border-radius: 10px;
  }
}

/* --- Compositor ---------------------------------------------------------------------------- */

.composer {
  padding-block: calc(var(--section) * 0.6) var(--section);
}

.composer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: clamp(40px, 8vw, 128px);
  align-items: center;
}

.composer__text .lede {
  margin-top: 28px;
}

.composer__text p:last-child {
  margin-top: 20px;
  color: var(--ink-2);
  max-width: 34em;
}

.composer__shot {
  margin: 0;
}

@media (max-width: 760px) {
  .composer__grid {
    grid-template-columns: 1fr;
  }

  .composer__shot {
    width: 72%;
  }
}

/* --- Origens ------------------------------------------------------------------------------- */

.sources {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
}

.sources__grid {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 56px);
}

.sources article {
  border-top: 1px solid var(--line-strong);
  padding-top: 20px;
}

.sources h3 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ivory);
}

.sources p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 16px;
}

@media (max-width: 860px) {
  .sources__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Privacidade --------------------------------------------------------------------------- */

.private {
  padding-block: var(--section);
  background: var(--surface);
}

.private__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(40px, 7vw, 112px);
}

.private__list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 48px);
}

.private__list dt {
  font-weight: 500;
  color: var(--ink);
  font-size: 1.0625rem;
}

.private__list dt::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin-bottom: 16px;
  background: var(--ivory);
}

.private__list dd {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}

.private__more {
  grid-column: 2;
}

@media (max-width: 860px) {
  .private__grid {
    grid-template-columns: 1fr;
  }

  .private__more {
    grid-column: 1;
  }
}

@media (max-width: 520px) {
  .private__list {
    grid-template-columns: 1fr;
  }
}

/* --- Disponibilidade ----------------------------------------------------------------------- */

.availability {
  padding-block: var(--section);
}

.availability__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 64px;
  align-items: end;
}

.availability .lede {
  margin-top: 24px;
}

.specs {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.specs > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.specs dt {
  color: var(--ink-3);
  font-size: 15px;
}

.specs dd {
  margin: 0;
  color: var(--ink);
}

@media (max-width: 760px) {
  .availability__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Rodapé -------------------------------------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--line);
  padding-block: 56px 64px;
  font-size: 14px;
  color: var(--ink-3);
}

.colophon__inner {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
}

.colophon__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ivory);
  font-size: 15px;
}

.colophon__symbol svg {
  width: 28px;
  height: 28px;
}

.colophon__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: center;
}

.colophon__nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.colophon__nav a:hover {
  color: var(--ink);
}

.colophon__notes {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  max-width: 56em;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .colophon__inner {
    grid-template-columns: 1fr;
  }
}

/* --- Páginas de documento ------------------------------------------------------------------ */

.doc {
  width: min(100% - 2 * var(--gutter), 760px);
  margin: 0 auto;
  padding: 148px 0 var(--section);
}

.doc__kicker {
  color: var(--ink-3);
  font-size: 15px;
}

.doc h1 {
  margin-top: 12px;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 350;
  color: var(--ivory);
}

.doc__meta {
  margin-top: 20px;
  color: var(--ink-3);
  font-size: 15px;
}

.doc__summary {
  margin-top: 40px;
  padding: 24px 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.doc__summary p + p,
.doc__summary ul {
  margin-top: 12px;
}

.doc h2 {
  margin-top: 64px;
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ivory);
  scroll-margin-top: 96px;
}

.doc h3 {
  margin-top: 32px;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
}

.doc p,
.doc ul,
.doc ol,
.doc dl,
.doc table {
  margin-top: 16px;
}

.doc p,
.doc li,
.doc dd,
.doc td {
  color: var(--ink-2);
}

.doc ul,
.doc ol {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 8px;
}

.doc li::marker {
  color: var(--ink-3);
}

.doc strong {
  color: var(--ink);
  font-weight: 500;
}

.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--ink);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
}

.doc th {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--line-strong);
}

.doc .table-scroll {
  overflow-x: auto;
  margin-top: 16px;
}

.doc .table-scroll table {
  margin: 0;
  min-width: 560px;
}

.doc__toc {
  margin-top: 40px;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
}

.doc__toc li {
  break-inside: avoid;
  margin: 0 0 6px;
}

.doc__toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.doc__toc a:hover {
  color: var(--ink);
}

@media (max-width: 560px) {
  .doc__toc {
    columns: 1;
  }
}

.faq {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  position: relative;
  color: var(--ink);
  font-weight: 500;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: rotate(45deg);
  transition: transform 200ms var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(225deg);
  margin-top: -2px;
}

.faq details > *:not(summary) {
  margin-top: 0;
  padding-bottom: 20px;
}

.contact {
  margin-top: 24px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.contact p:first-child {
  font-size: 1.25rem;
  color: var(--ink);
}

/* --- Apagar a conta ------------------------------------------------------------------------ */

.account-form {
  margin-top: 24px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
}

.account-form label {
  display: grid;
  gap: 8px;
  font-size: 15px;
  color: var(--ink-2);
}

.account-form input[type="email"],
.account-form input[type="password"] {
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.account-form input:focus {
  outline: 2px solid var(--ivory);
  outline-offset: 1px;
}

.account-form .check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink);
}

.account-form .check input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--danger);
}

.account-form button {
  justify-self: start;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.account-form button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.account-form [role="alert"],
.account-form .status {
  font-size: 15px;
}

.account-form [role="alert"] {
  color: #ffb4ab;
}

.account-done {
  margin-top: 24px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.account-done h2 {
  margin-top: 0;
}

/* --- Página não encontrada ----------------------------------------------------------------- */

.missing {
  min-height: 70svh;
  display: grid;
  align-content: center;
  width: min(100% - 2 * var(--gutter), 760px);
  margin: 0 auto;
  padding-top: 120px;
}

.missing p {
  margin-top: 20px;
  color: var(--ink-2);
}

.missing .missing__other {
  margin-top: 48px;
  font-size: 15px;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* A fotografia da abertura abre-se a partir de um quadrado, como a moldura do símbolo se abre
   para uma fotografia (Docs/BRAND_IDENTITY.md §13). */
@keyframes frame-open {
  from {
    clip-path: inset(calc(50% - 7vmin) calc(50% - 7vmin));
  }
  to {
    clip-path: inset(0);
  }
}

.hero__stage {
  animation: frame-open 1000ms cubic-bezier(0.65, 0, 0.15, 1) 120ms both;
}

@media (prefers-reduced-motion: reduce) {
  .hero__stage {
    animation: none;
  }
}
