/* Content elements (headings, paragraphs, lists, images, blockquotes, ...) */

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

  body {
    line-height: 1.5;
    color: var(--base-800);
    font-family: system-ui;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  h1,
  h2,
  h3,
  h4 {
    margin-block: 0.5em;
    text-wrap: balance;
    line-height: 1.25;
    + p {
      margin-top: 0;
    }
  }

  ol,
  ul,
  table {
    margin-block: var(--m);
  }

  a {
    color: var(--link);
    &:visited {
      color: var(--visited);
    }
    &[name] {
      color: inherit;
    }
    &:target {
      background-color: #fff3cd;
    }
  }

  strong {
    color: var(--base-800);
  }

  p,
  li,
  td {
    color: var(--base-600);
    text-wrap: pretty;

    code {
      background-color: var(--base-200);
      font-family: courier, monospace;
      padding: 0.125em 0.25em;
      font-size: 0.875em;
    }
  }

  ol,
  ul {
    padding-left: 1em;
  }

  li {
    padding-left: 0.5em;
  }

  hr {
    border: 1px solid var(--base-200);
    margin-block: var(--l);
    border-width: 1px 0 0;
  }

  blockquote {
    font-weight: bold;
    margin: var(--l) 0;
  }

  small,
  figcaption {
    font-weight: 400;
    font-size: 0.875em;
    color: var(--base-600);
  }

  dl {
    display: grid;
    grid-template-columns: 25% 1fr;
    > * {
      margin: 0.25em 0;
    }
    dt {
      font-weight: 500;
    }
    p:first-child {
      margin-top: 0;
    }
  }

  time {
    white-space: nowrap;
  }

  article {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 22px;
  }
}

:root {
  --ink: #f6f2ea;
  --smoke: #1f1a14;
  --ash: #d6cec2;
  --coal: #2f2923;
  --gold: #ca9f88;
  --muted: #7a7165;
  --radius: 16px;
  --border: 1px solid rgba(47, 41, 35, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--smoke);
}
body {
  font-family:
    Inter,
    system-ui,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial;
  padding-top: 72px;
}
a {
  color: inherit;
  text-decoration: none;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(47, 41, 35, 0.08);
}
nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 20px;
}
.logo img {
  display: block;
  max-height: 42px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-links a {
  text-decoration: none;
  color: var(--smoke);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 41, 35, 0.14);
  font-size: 13px;
  color: #5a5146;
  background: rgba(255, 255, 255, 0.72);
}

main {
  padding: 18px 0 48px;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}
.hero {
  padding: 38px 0 10px;
}
.eyebrow {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 44px;
  font-weight: 600;
  margin: 0 0 12px;
}
h1.light {
  color: rgba(246, 242, 234, 0.92);
}
.sub {
  color: #6f665b;
}
.lede {
  color: #6f665b;
  margin: 10px 0 14px;
  font-size: 18px;
  max-width: 760px;
  line-height: 1.6;
}
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

section {
  padding: 28px 0;
}
.panel {
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
.row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}
.grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.payrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.step-title {
  margin-top: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
}
.step-subhead {
  margin: 16px 0 6px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
}
.stack-gap-sm {
  margin-top: 12px;
}
.controls.spaced-top {
  margin-top: 10px;
}
.recipient-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.select-tall {
  height: 48px;
}
.filter-field-sm {
  display: grid;
  gap: 6px;
  min-width: 120px;
}
.filter-field-md {
  display: grid;
  gap: 6px;
  min-width: 180px;
}
.filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}
.mt-12 {
  margin-top: 12px;
}
.mt-18 {
  margin-top: 18px;
}
.mt-22 {
  margin-top: 22px;
}
.mt-28 {
  margin-top: 28px;
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(47, 41, 35, 0.18);
  background: transparent;
  color: var(--smoke);
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
  width: 100%;
}
.controls .btn {
  width: auto;
}
.btn[disabled],
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}
.btn-primary {
  border-color: transparent;
  background: var(--gold);
  color: var(--ink);
}
.btn-secondary {
  border-color: rgba(47, 41, 35, 0.16);
  background: rgba(47, 41, 35, 0.06);
}
.btn-danger {
  border-color: #b56969;
  color: #5a1f1f;
  background: rgba(201, 142, 130, 0.14);
}
.btn-text {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 2px 0;
  width: auto;
}

input[type='text'],
input[type='tel'],
textarea,
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(47, 41, 35, 0.16);
  background: rgba(255, 255, 255, 0.7);
  color: var(--smoke);
  font-size: 15px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.input:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 169, 105, 0.18);
}
label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #5a5146;
  font-weight: 500;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

audio {
  width: 100%;
}
footer {
  padding: 36px 0;
  color: #6f665b;
  border-top: 1px solid rgba(47, 41, 35, 0.08);
  margin-top: 28px;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(47, 41, 35, 0.08);
  border-radius: 14px;
  padding: 16px 16px 14px;
}
.card h3 {
  margin: 0 0 6px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 22px;
}
.desc {
  color: #62594f;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
}
.status-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(47, 41, 35, 0.08);
  background: rgba(199, 169, 105, 0.12);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6bd48c;
  box-shadow: 0 0 0 6px rgba(107, 212, 140, 0.22);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(231, 226, 216, 0.14);
  font-size: 13px;
  color: #dad4cc;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 10px;
}
.pill.success {
  border-color: rgba(107, 212, 140, 0.5);
  color: #b5f4c9;
  background: rgba(107, 212, 140, 0.08);
}
.pill.warn {
  border-color: rgba(199, 169, 105, 0.5);
  color: #e8d8ae;
  background: rgba(199, 169, 105, 0.08);
}
.pill.error {
  border-color: rgba(227, 98, 98, 0.5);
  color: #ffb2b2;
  background: rgba(227, 98, 98, 0.08);
}
.otp-inputs {
  display: flex;
  gap: 10px;
}
.otp-inputs input {
  text-align: center;
  letter-spacing: 2px;
  font-size: 18px;
}
.loader {
  margin: 18px auto;
  border: 4px solid rgba(255, 255, 255, 0.06);
  border-top: 4px solid var(--gold);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  animation: spin 1s linear infinite;
}
.audio-player {
  margin-top: 10px;
}
.step-footer {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.moment-shell {
  background: linear-gradient(145deg, rgba(199, 169, 105, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(199, 169, 105, 0.18);
}
.moment-list {
  display: grid;
  gap: 16px;
}
.moment-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(47, 41, 35, 0.12);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.moment-card + .moment-card {
  margin-top: 0;
}
.moment-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.moment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.moment-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #5a5146;
  font-size: 14px;
}
.moment-meta span {
  display: block;
}
.moment-playback {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(47, 41, 35, 0.08);
}
.moment-tags,
.moment-message {
  color: #5a5146;
}
.filters-panel .timeline-controls {
  display: grid;
  gap: 12px;
}
.filters-panel:not(.expanded) .timeline-controls {
  display: none;
}
.filters-panel .timeline-head {
  align-items: center;
}
.hidden {
  display: none !important;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Recorder specifics */
.recording-interface {
  display: block;
}
.microphone {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(45deg, #667eea, #764ba2);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}
.microphone:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}
.microphone.recording {
  background: linear-gradient(45deg, #ff6b6b, #ee5a52);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.mic-icon {
  font-size: 3rem;
  color: white;
}
.recording-status {
  font-size: 1.1rem;
  margin-bottom: 20px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.recording-timer {
  font-weight: bold;
  color: #ff6b6b;
}
.audio-player.show {
  display: block;
}

/* Marketing / landing */
.hero-landing {
  position: relative;
  padding: 120px 0 80px;
  background:
    radial-gradient(900px 400px at 20% -10%, rgba(199, 169, 105, 0.12), transparent 60%),
    radial-gradient(800px 320px at 90% 0%, rgba(255, 255, 255, 0.06), transparent 65%);
}
.hero-landing.media-bg {
  background-image: url('/assets/img/hero-photos.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-landing.media-bg:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 11, 12, 0.65) 0%,
    rgba(11, 11, 12, 0.75) 40%,
    rgba(11, 11, 12, 0.92) 100%
  );
}
.hero-landing .container {
  position: relative;
  z-index: 1;
}
.hero-landing h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 64px;
  line-height: 1.02;
  margin: 0 0 16px;
}
.hero-landing p {
  font-size: 20px;
  color: #d9d3cb;
  max-width: 62ch;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.sub-note {
  margin-top: 10px;
  color: #bdb5aa;
  font-size: 14px;
}
.kicker {
  color: #5a5146;
  margin-bottom: 26px;
}
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
}
.lead {
  font-size: 18px;
  color: #4b4339;
}
.card {
  background: #ffffff;
  border: 1px solid rgba(47, 41, 35, 0.08);
  border-radius: var(--radius);
  padding: 22px;
}
.quote {
  padding: 48px 0;
  border-top: 1px solid rgba(47, 41, 35, 0.08);
  border-bottom: 1px solid rgba(47, 41, 35, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08));
}
.quote p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  line-height: 1.25;
  margin: 0;
}
.quote .sig {
  margin-top: 12px;
  color: #7a7165;
}
.promise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.promise .item {
  padding: 12px 0;
}
.promise .item h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 18px;
}
.promise .item p {
  color: #6f665b;
}
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.media-grid img,
.media-wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(231, 226, 216, 0.1);
  filter: saturate(0.9) contrast(0.98);
}
.media-wide {
  margin-top: 18px;
}
.caption {
  font-size: 12px;
  color: #7a7165;
  margin-top: 6px;
}

@media (max-width: 920px) {
  .row,
  .grid,
  .payrow {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 36px;
  }
  body {
    padding-top: 82px;
  }
}
/* Auth modal overlay */
#authOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
#authDialog {
  background: rgba(20, 20, 22, 0.95);
  border: 1px solid rgba(231, 226, 216, 0.12);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
#authDialog .stack {
  gap: 10px;
}
#authClose {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 1px solid rgba(231, 226, 216, 0.15);
  color: var(--smoke);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}
