/*
 * RAF Pictures bio link. Look and feel follows the RAF Scatter docs:
 * calm monochrome "design-system docs" language, floating sidebar card on desktop,
 * top bar card on mobile, quiet surfaces, hairlines, one accent.
 */

/* ---------- Base ---------- */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 22px 22px;
  background-attachment: fixed;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  font-weight: 600;
}

p {
  margin: 0;
}

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

.ph {
  line-height: 1;
}

.mono {
  font-family: var(--font-mono);
}

/* ---------- Brand ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
}

.logo-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--well);
  box-shadow: inset 0 0 0 1px #ffffff14;
}

.logo-tile img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-name {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  color: var(--text-2);
  font-size: 0.8125rem;
}

/* ---------- Sidebar card (desktop) ---------- */

.sidebar {
  display: none;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 0.75rem 0.75rem;
}

.sidebar .brand {
  padding: 0 0.5rem 1.25rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav-group + .nav-group {
  margin-top: 1.25rem;
}

.nav-label {
  padding: 0 0.75rem 0.35rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.3rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: start;
  text-decoration: none;
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease),
    transform 200ms var(--ease);
}

.nav-item .ph {
  font-size: 1rem;
  color: var(--text-muted);
  transition: color 150ms var(--ease);
}

.nav-item:hover {
  background-color: var(--hover);
  color: var(--text);
  transform: translateX(2px);
}

.nav-item:hover .ph {
  color: var(--text);
}

/* Current item: no colour, weight only */
.nav-item[aria-current='page'],
.nav-item[aria-current='true'] {
  color: var(--text);
  font-weight: 700;
}

.nav-item[aria-current='page'] .ph,
.nav-item[aria-current='true'] .ph {
  color: var(--text);
}

.nav-item--sm {
  font-size: var(--text-sm);
}

.nav-item .ext {
  margin-inline-start: auto;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 150ms var(--ease);
}

.nav-item:hover .ext {
  opacity: 1;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
}

/* Desktop side panel: Subscribe and the theme button share one row */
.sidebar-foot-row { display: flex; align-items: center; gap: 0.5rem; }
.sidebar-foot-row .btn { flex: 1; }

.controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Top bar (mobile) ---------- */

.topbar {
  position: sticky;
  top: var(--gutter);
  z-index: 40;
  margin: var(--gutter);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-float);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 3.5rem;
  padding: 0 0.6rem 0 0.75rem;
}

.topbar .brand-sub {
  display: none;
}

.topbar .controls {
  gap: 0.375rem;
}

.mobile-menu {
  display: none;
  padding: 0.25rem 0.75rem 0.75rem;
  border-top: 1px solid var(--line);
}

.topbar.is-open .mobile-menu {
  display: block;
}

.mobile-menu .nav {
  padding-top: 0.5rem;
}

.mobile-menu .btn {
  width: 100%;
  margin-top: 0.75rem;
}

/* ---------- Controls: icon buttons, language, theme ---------- */

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  transition:
    background-color 150ms var(--ease),
    transform 150ms var(--ease);
}

.icon-btn:hover {
  background: var(--hover);
}

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

.theme-btn .ph-moon {
  display: none;
}

:root[data-theme='light'] .theme-btn .ph-sun {
  display: none;
}

:root[data-theme='light'] .theme-btn .ph-moon {
  display: inline-block;
}

.seg {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.seg button {
  min-width: 2.25rem;
  height: calc(2.25rem - 4px);
  padding: 0 0.6rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-pressed='true'] {
  background: var(--hover);
  color: var(--text);
}

.controls .seg {
  flex: 1;
}

.controls .seg button {
  flex: 1;
}

.topbar .controls .seg {
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms var(--ease),
    border-color 150ms var(--ease),
    transform 150ms var(--ease);
}

.btn:hover {
  background-color: var(--hover);
}

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

.btn .ph {
  font-size: 1rem;
  transition: transform 150ms var(--ease);
}

.btn:hover .ph-arrow-right,
.btn:hover .ph-arrow-up-right {
  transform: translateX(2px);
}

.btn--primary {
  border-color: transparent;
  background-color: var(--text);
  color: var(--bg);
}

.btn--primary:hover {
  background-color: color-mix(in srgb, var(--text) 88%, var(--bg));
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Content column ---------- */

.main {
  padding: 2rem 1rem 0;
}

.content {
  width: 100%;
  max-width: var(--content-w);
}

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

.hero {
  padding: 1.5rem 0 2.5rem;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-title {
  font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 40ch;
  margin-top: 1rem;
  color: var(--text-2);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.socials {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.socials .icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text-2);
  font-size: 1.15rem;
}

.socials .icon-btn:hover {
  color: var(--text);
}

/* ---------- Tabs (Links / Assets) ---------- */

.tabs {
  display: flex;
  margin-bottom: 2.5rem;
}

.tabs .seg button {
  min-width: 6.5rem;
  height: 2.25rem;
  font-size: var(--text-sm);
}

.panel[hidden] {
  display: none;
}

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

.section + .section {
  margin-top: 3rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-2);
  font-size: var(--text-sm);
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  color: inherit;
  text-decoration: none;
  transition:
    background-color 150ms var(--ease),
    box-shadow 150ms var(--ease);
}

a.card:hover,
button.card:hover {
  background: var(--hover);
}

button.card {
  width: 100%;
  border: 0;
  text-align: start;
}

.card h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.card-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  transition:
    transform 150ms var(--ease),
    color 150ms var(--ease);
}

.card:hover .card-arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* Image well: dark in both themes */
.well {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--well);
  box-shadow: inset 0 0 0 1px #ffffff12;
}

.well img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}

/* Course: feature card */
.feature {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  padding: 1rem;
}

.feature .well {
  aspect-ratio: 3 / 4;
}

.feature:hover .well img {
  transform: scale(1.03);
}

.feature-body {
  display: flex;
  flex-direction: column;
  align-self: center;
  gap: 0.5rem;
  padding-right: 1.5rem;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-2);
  font-size: var(--text-sm);
}

.meta img {
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
}

.tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1em 0.5em;
  border-radius: var(--radius-xs);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
}

.tag--plain {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-mono);
}

/* Services: two icon cells */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
}

.cell .well {
  display: grid;
  place-items: center;
  height: 6.5rem;
  margin-bottom: 0.65rem;
  color: #f2f2f2;
  font-size: 2rem;
}

.cell .well .ph {
  transition: transform 200ms var(--ease);
}

.cell:hover .well .ph {
  transform: translateY(-3px);
}

.cell--violet .well {
  background:
    radial-gradient(120% 90% at 50% 120%, #a48be033, transparent 60%),
    var(--well);
}

/* Showcase: video tiles */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 0.75rem;
}

.video {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0;
  border: 0;
  background: none;
  text-align: start;
}

.video .well {
  aspect-ratio: 16 / 9;
}

.video .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, #0a0a0a99, transparent 55%);
  opacity: 0.9;
  transition: opacity 150ms var(--ease);
}

.video .play span {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: #f2f2f2;
  color: #111111;
  font-size: 1rem;
  transform: scale(0.94);
  transition: transform 200ms var(--ease);
}

.video:hover .well img {
  transform: scale(1.04);
}

.video:hover .play span {
  transform: scale(1);
}

.video-title {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
}

.video-meta {
  margin-top: 0.15rem;
  color: var(--text-2);
  font-size: 0.8125rem;
}

/* Portfolio: closing call to action */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.cta h3 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.cta p {
  margin-top: 0.25rem;
  color: var(--text-2);
  font-size: var(--text-sm);
}

/* Assets: list rows */
.rows {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 150ms var(--ease);
}

.row + .row {
  border-top: 1px solid var(--line);
}

.row:hover {
  background: var(--hover);
}

.row .well {
  width: 3.5rem;
  height: 3.5rem;
}

.row-title {
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
}

.row-desc {
  margin-top: 0.15rem;
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.row-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.row:hover .row-end .ph {
  color: var(--text);
}

/* ---------- Notes ---------- */

.note {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--text-base);
  line-height: 1.6;
}

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

.note ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.1rem;
}

.note li::marker {
  color: var(--text-muted);
}

.note--outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* ---------- Forms ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label,
.field-label {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  transition:
    border-color 150ms var(--ease),
    box-shadow 150ms var(--ease);
}

.textarea {
  height: auto;
  min-height: 7rem;
  padding: 0.65rem 0.85rem;
  resize: vertical;
  line-height: 1.55;
}

.select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%238a8a8a' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.9rem;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--text-muted);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent);
}

.field-hint {
  color: var(--text-2);
  font-size: 0.8125rem;
}

.field-error {
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
}

.field-error::before {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.45rem;
  border: 1px solid var(--text);
  border-radius: 2px;
  vertical-align: 0.05em;
}

.inline-fields {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.inline-fields .x {
  color: var(--text-muted);
}

.copy-field {
  display: flex;
  gap: 0.5rem;
}

.copy-field .input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}

th,
td {
  padding: 0.7rem 1rem;
  text-align: start;
  white-space: nowrap;
}

th {
  background: var(--surface);
  color: var(--text-2);
  font-weight: 500;
}

tbody tr + tr td {
  border-top: 1px solid var(--line);
}

td.num,
th.num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

td:first-child {
  color: var(--text);
}

/* ---------- Calculator result ---------- */

.calc {
  padding: 1.25rem;
}

.result {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.result-label {
  color: var(--text-2);
  font-size: var(--text-sm);
}

.result-price {
  margin-top: 0.15rem;
  color: var(--text);
  font-size: clamp(2rem, 1.6rem + 1.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.result-time {
  margin-top: 0.35rem;
  color: var(--text-2);
  font-size: var(--text-sm);
}

.result .btn {
  margin-top: 1.25rem;
}

/* ---------- Dialogs ---------- */

.modal {
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-body);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-float);
  overflow: auto;
}

.modal--wide {
  width: min(44rem, calc(100vw - 2rem));
}

.modal--video {
  width: min(64rem, calc(100vw - 2rem));
  background: var(--well);
}

.modal::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(2px);
}

.modal-body {
  padding: 1.5rem;
}

.modal-head {
  padding-right: 2.5rem;
  margin-bottom: 1.25rem;
}

.modal-head h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.modal-head p {
  margin-top: 0.35rem;
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  z-index: 3;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border-color: var(--line);
  background: transparent;
  color: var(--text-2);
  font-size: 0.95rem;
}

.modal-close:hover {
  color: var(--text);
}

.modal--video .modal-close {
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  border-color: #ffffff26;
  background: #111111cc;
  color: #f2f2f2;
}

.modal-media {
  margin-bottom: 1.25rem;
}

.modal-media.well {
  aspect-ratio: 16 / 9;
}

.modal-media--cover {
  width: 8rem;
  aspect-ratio: 3 / 4;
}

.modal-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.flipbook {
  position: relative;
  aspect-ratio: 584 / 346;
  border-radius: var(--radius-sm);
  background: var(--well);
  overflow: hidden;
}

.flipbook iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8a8a8a;
  font-size: var(--text-sm);
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.done-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: var(--well);
  color: #f2f2f2;
  font-size: 1.35rem;
}

@media (prefers-reduced-motion: no-preference) {
  .modal[open] {
    animation: modal-in 220ms var(--ease);
  }

  .modal[open]::backdrop {
    animation: fade-in 220ms var(--ease);
  }

  @keyframes modal-in {
    from {
      opacity: 0;
      transform: translateY(8px) scale(0.985);
    }
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
  }
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 4rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: var(--text-sm);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.footer a:hover {
  color: var(--text);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .reveal {
    animation: rise 700ms var(--ease) both;
    animation-delay: calc(var(--i, 0) * 80ms + 40ms);
  }

  .panel.is-entering {
    animation: rise 420ms var(--ease) both;
  }

  /* Page change between index and renderfarm: only the content cross-fades. */
  @view-transition {
    navigation: auto;
  }

  .main {
    view-transition-name: main;
  }

  .sidebar {
    view-transition-name: sidebar;
  }

  .topbar {
    view-transition-name: topbar;
  }

  ::view-transition-group(*),
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(sidebar),
  ::view-transition-new(sidebar),
  ::view-transition-old(topbar),
  ::view-transition-new(topbar) {
    animation: none;
  }

  ::view-transition-old(main) {
    animation: page-out 200ms var(--ease-io) both;
  }

  ::view-transition-new(main) {
    animation: page-in 360ms var(--ease-io) 140ms both;
  }

  @keyframes page-out {
    to {
      opacity: 0;
    }
  }

  @keyframes page-in {
    from {
      opacity: 0;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item:hover {
    transform: none;
  }
}

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

@media (max-width: 30rem) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cell {
    padding: 0.75rem;
  }

  .cell .well {
    height: 4.5rem;
    font-size: 1.6rem;
  }

  .cell h3 {
    font-size: 1rem;
  }

  .cell .card-arrow {
    top: 0.75rem;
    right: 0.75rem;
  }

  .feature {
    grid-template-columns: 5.5rem 1fr;
    gap: 1rem;
  }

  .feature-body {
    padding-right: 1rem;
  }

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

  .row {
    grid-template-columns: 3rem 1fr auto;
    gap: 0.85rem;
  }

  .row .well {
    width: 3rem;
    height: 3rem;
  }

  .row-end .tag {
    display: none;
  }

  .actions .btn {
    flex: 1;
  }
}

@media (min-width: 60rem) {
  .topbar {
    display: none;
  }

  .sidebar {
    display: block;
    position: fixed;
    top: var(--gutter);
    bottom: var(--gutter);
    left: var(--gutter);
    z-index: 30;
    width: var(--sidebar-w);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
    overflow-y: auto;
  }

  .main {
    padding: 2.5rem 2.5rem 0 calc(var(--sidebar-w) + 2 * var(--gutter) + 5rem);
  }

  .hero {
    padding-top: 2.5rem;
  }
}

@media (min-width: 72rem) {
  .main {
    padding-left: calc(var(--sidebar-w) + 2 * var(--gutter) + 10rem);
  }
}

/* Social row in the hero is for mobile; on desktop the sidebar lists the same links. */
@media (min-width: 60rem) {
  .hero .socials {
    display: none;
  }
}

.mobile-menu .controls {
  margin-top: 0.75rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.back-link:hover {
  color: var(--text);
}

.back-link .ph {
  transition: transform 150ms var(--ease);
}

.back-link:hover .ph {
  transform: translateX(-2px);
}

[hidden] {
  display: none !important;
}

.note + .section {
  margin-top: 3rem;
}

.cell .card-arrow {
  display: none;
}

/* Commission: wide card with an icon well */
.feature--icon {
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
}

.feature--icon .well {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: #f2f2f2;
  font-size: 1.75rem;
}

.feature--icon .well .ph {
  transition: transform 200ms var(--ease);
}

.feature--icon:hover .well .ph {
  transform: translateY(-2px);
}

/* Mobile top bar: language switcher stays visible, Menu becomes icon-only on narrow screens */
.topbar .seg button {
  min-width: 2.1rem;
  padding: 0 0.45rem;
}

@media (max-width: 26rem) {
  .menu-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
  }

  .menu-label {
    display: none;
  }

  .topbar .brand-name {
    font-size: 0.9375rem;
  }
}

/* Honeypot: hidden from people, visible to bots */
.hp {
  position: absolute;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Form error: monochrome, set apart by an outline (no red) */
.form-status {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* Vertical list of feature cards (coming soon) */
.stack { display: grid; gap: 0.75rem; }

/* ---------- RAF Scatter logo (mask, so it takes the text color in both themes) ---------- */
.raf-logo {
  display: inline-block; width: 1em; height: 1em; flex: none;
  background: currentColor;
  /* logo embedded as data so it also shows when the page is opened from disk */
  --raf-logo: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHsAAACACAYAAAArkhalAAARXklEQVR42u2de5DdVZHHv919fvdmZvJCJcVj19oHcd1yXS0RXWItJDwNBFgJIfgIYqk8lsfi+sJdS2trrdJVVOQRAgQSBrLRkCiPEoOGBNS4aoyoK6JBN4jkQcIjZJjX73e6e//I71KXW/PKMHfm3ju/rpo/MpP76s/tPn36dJ8GWkB6e3uPcvevqerPYowXuHsHCmkt2bdv36tijP+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aiZ5WU8hBf7kkSZJXDQq7KrJ7wczWxBiXlsvlXxSqa0rYpKpThrLs52OMnSGEa0TkkUJlzStmpiKyd1DYaZq+eyTD0AtpjLyI5OvtIHt5ATDoQVMoQDePuPvzZrbZ3aW2esXdiYgiM+8f1M0XKqyfbNu2rTx79uyTVXVqzX6ZReRJItp8kLAZQHj88ccH5DZ79mwHEPPypELGU7q7u49U1Z3u7mb20k8u33f30riuAQWS+kl7e/ssANNyq3xZ262ZKUbZelvAbkBJ0/RlkMeix7qA3aBSKpX2mFnXIMeepfHWfwG7vtLLzA1TxFHArq8bfy2AVw90fMnMVMBuLTeeDpbkMLMnhkqA1EP+H33dAGT5xYUEAAAAAElFTkSuQmCC");
  -webkit-mask: var(--raf-logo) center / contain no-repeat;
          mask: var(--raf-logo) center / contain no-repeat;
}
.nav-item .raf-logo { width: 1.05rem; height: 1.05rem; }
.feature--icon .well .raf-logo { width: 2rem; height: 2rem; transition: transform 200ms var(--ease); }
.feature--icon:hover .well .raf-logo { transform: translateY(-2px); }
.nav-badge {
  margin-left: auto; font-size: 0.7rem; line-height: 1; padding: 0.25rem 0.4rem;
  border-radius: 6px; border: 1px solid var(--line); color: var(--text-2);
}

/* ---------- RAF Scatter teaser page ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem; width: fit-content;
  font-size: 0.875rem; color: var(--text-2); margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--text); }
.teaser-hero .tag { width: fit-content; }
.teaser-mark {
  width: 4.5rem; height: 4.5rem; border-radius: 12px; display: grid; place-items: center;
  background: var(--well); color: #f2f2f2; margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.teaser-mark .raf-logo { width: 2.6rem; height: 2.6rem; }
.teaser-media {
  margin: 0 0 2.5rem; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--well); aspect-ratio: 1600 / 938;
}
.teaser-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.peek { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .peek { grid-template-columns: repeat(3, 1fr); } }
.peek .cell { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.peek .cell .well {
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 8px;
  background: var(--well); color: #f2f2f2; font-size: 1.2rem; margin-bottom: 0.5rem;
}
.peek .cell h3 { font-size: 1rem; margin: 0; }
.peek .cell p { margin: 0; color: var(--text-2); font-size: 0.9rem; }
.facts { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li {
  font-size: 0.8rem; padding: 0.35rem 0.6rem; border-radius: 6px;
  border: 1px solid var(--line); color: var(--text-2);
}
