/* Amo Capital — shared styles
   Brand values taken from the live amo.capital site:
   Newsreader (display), Instrument Sans (body), IBM Plex Mono (labels),
   cream #ECE8E0, ink #1B1E19, gold #A88350. */
:root {
  --cream: #ece8e0;
  --cream-soft: rgba(236, 232, 224, 0.74);
  --cream-faint: rgba(236, 232, 224, 0.38);
  --ink: #1b1e19;
  --ink-deep: #121411;
  --gold: #a88350;
  --gold-hi: #bf9a64;
  --panel: rgba(18, 20, 17, 0.62);
  --line: rgba(236, 232, 224, 0.2);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }

body {
  background: var(--ink-deep);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background: mountain photo, forced monochrome ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    url("/images/mountain.jpg") center 35% / cover no-repeat,
    radial-gradient(ellipse at 50% 30%, #3a3c38 0%, #121411 70%);
  filter: grayscale(100%) contrast(1.08) brightness(0.72);
  transform: scale(1.03);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,11,9,0.35) 0%, rgba(10,11,9,0.2) 40%, rgba(10,11,9,0.75) 100%);
}
.backdrop.heavy::after { background: rgba(12, 13, 11, 0.72); }

/* ---------- Layout ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 72px;
  text-align: center;
}

/* ---------- Logo ---------- */
.logo-wrap { display: flex; justify-content: center; text-decoration: none; color: inherit; }
.logo-img { display: block; width: min(560px, 80vw); height: auto; }
.logo-small .logo-img { width: min(190px, 50vw); }
.wordmark { display: none; font-family: var(--serif); font-size: clamp(3rem, 11vw, 7rem); letter-spacing: 0.2em; padding-left: 0.2em; }
.logo-small .wordmark { font-size: 2.2rem; }
.logo-failed .logo-img { display: none; }
.logo-failed .wordmark { display: block; }

/* ---------- Labels & buttons (mono, as on the live site) ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: clamp(40px, 8vh, 72px);
}
.btn {
  display: inline-block;
  min-width: 230px;
  padding: 16px 26px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: var(--cream);
  background: rgba(18, 20, 17, 0.35);
  border: 1px solid var(--cream-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover, .btn:focus-visible { background: var(--cream); color: var(--ink); border-color: var(--cream); outline: none; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink-deep); }
.btn-gold:hover, .btn-gold:focus-visible { background: var(--gold-hi); border-color: var(--gold-hi); color: var(--ink-deep); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- Panels ---------- */
.panel {
  width: 100%;
  max-width: 580px;
  margin-top: 40px;
  padding: 40px 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: left;
}
.panel-narrow { max-width: 440px; }
h1.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
  margin: 12px 0 28px;
}

/* Criteria list */
.criteria { list-style: none; border-top: 1px solid var(--line); }
.criteria li {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.4;
}
.criteria .num {
  flex: 0 0 2.2em;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold-hi);
}
.note { margin-top: 24px; font-size: 0.92rem; line-height: 1.6; color: var(--cream-soft); }

/* Forms */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-soft);
}
.field input {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--cream);
  background: rgba(236, 232, 224, 0.06);
  border: 1px solid var(--line);
  border-radius: 0;
}
.field input:focus { outline: none; border-color: var(--gold); }
.row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 26px;
  font-size: 0.86rem;
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--cream-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linklike:hover { color: var(--cream); }
.panel .btn { width: 100%; }
.form-msg {
  display: none;
  margin-top: 20px;
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  border-left: 2px solid var(--gold);
  background: rgba(236, 232, 224, 0.06);
}
.form-msg.show { display: block; }
.form-msg.error { border-left-color: #c9695a; }

/* Back link + footer */
.back {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-soft);
  text-decoration: none;
}
.back:hover { color: var(--cream); }
.footer {
  margin-top: 44px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-faint);
}
.page-landing .footer { position: absolute; bottom: 20px; left: 16px; right: 16px; margin: 0; }
.page-landing { position: relative; }

/* ---------- Investor portal ---------- */
.portal-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(18, 20, 17, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.portal-bar .logo-img { width: 120px; }
.portal-bar .who { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--cream-soft); }
.portal-bar .btn { min-width: 0; padding: 10px 16px; font-size: 0.66rem; }
.portal-main { max-width: 1100px; margin: 0 auto; padding: 40px 16px 64px; }
.portal-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.portal-head h1.title { margin-bottom: 0; }
.portal-head .actions { margin-top: 0; }
.portal-head .btn { min-width: 0; }
.confidential {
  margin-bottom: 20px;
  padding: 14px 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--cream-soft);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: rgba(236, 232, 224, 0.04);
}
.deck-frame {
  display: block;
  width: 100%;
  height: min(78vh, 820px);
  border: 1px solid var(--line);
  background: #2a2c28;
}
.deck-fallback { margin-top: 14px; font-size: 0.85rem; color: var(--cream-soft); }
.deck-fallback a { color: var(--cream); }

@media (max-width: 560px) {
  .panel { padding: 30px 20px; }
  .actions { width: 100%; max-width: 320px; flex-direction: column; }
  .btn { min-width: 0; width: 100%; }
  .portal-bar { padding: 12px 16px; }
  .portal-bar .who span { display: none; }
  .portal-head .actions { max-width: none; flex-direction: row; }
  .portal-head .btn { width: auto; flex: 1; }
  .deck-frame { height: 60vh; }
}

/* ---------- Certification gate ---------- */
.gate-pending body > *:not(.backdrop) { visibility: hidden; }

/* ---------- Portal navigation ---------- */
.portal-nav { display: flex; gap: 28px; margin-right: auto; margin-left: 32px; }
.portal-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-soft);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.portal-nav a:hover { color: var(--cream); }
.portal-nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--gold); }
.cert-note { margin-top: 28px; font-size: 0.82rem; line-height: 1.6; color: var(--cream-faint); }
.cert-note a { color: var(--cream-soft); }

/* ---------- Certification form ---------- */
.portal-narrow { max-width: 780px; }
.lead { font-size: 1rem; line-height: 1.65; color: var(--cream-soft); margin: -8px 0 28px; }
fieldset.choice { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
fieldset.choice legend { margin-bottom: 14px; }
.choice-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 18px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 0.9rem; line-height: 1.5; color: var(--cream-soft);
}
.choice-card strong { color: var(--cream); font-weight: 500; font-size: 1rem; }
.choice-card:has(input:checked) { border-color: var(--gold); background: rgba(168, 131, 80, 0.12); }
.choice-card input { margin-top: 4px; accent-color: var(--gold); }
.statement {
  padding: 30px 32px; margin-bottom: 18px;
  background: rgba(236, 232, 224, 0.96); color: #1b1e19;
  border: 1px solid var(--line);
  font-size: 0.95rem; line-height: 1.6;
}
.statement > p { margin-bottom: 12px; }
.statement-title {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; text-align: center;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid rgba(27,30,25,0.25);
}
.statement .q { margin: 16px 0; }
.statement .yn { display: flex; gap: 28px; margin: 8px 0 0 18px; }
.statement .yn label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.statement input[type="radio"], .statement input[type="checkbox"] { width: 17px; height: 17px; accent-color: #1b1e19; }
.statement .detail { display: none; margin: 12px 0 0 18px; }
.statement .detail.open { display: block; }
.statement .detail label { display: block; font-size: 0.88rem; margin-bottom: 6px; color: #3b3e38; }
.statement .detail input, .signature input#full_name {
  width: 100%; max-width: 460px; padding: 10px 12px; font: inherit;
  color: #1b1e19; background: #fff; border: 1px solid rgba(27,30,25,0.35); border-radius: 0;
}
.statement .detail input.short { max-width: 140px; }
.statement .money { display: flex; align-items: center; gap: 6px; max-width: 260px; }
.statement .joiner { font-weight: 600; margin: 4px 0; }
.statement.is-none .q:not(:last-of-type) { opacity: 0.4; }
.declaration { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(27,30,25,0.25); }
.declaration p { margin-bottom: 10px; }
.declaration ol { margin: 0 0 12px 40px; }
.declaration li { margin-bottom: 6px; padding-left: 4px; }
.signature .field label { color: #1b1e19; }
.signature .sig-date { margin: 4px 0 16px; }
.signature .confirm { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 22px; font-size: 0.9rem; cursor: pointer; }
.signature .confirm input { margin-top: 3px; flex: 0 0 auto; }
.signature .btn { width: 100%; }
.signature .btn-gold { color: #121411; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 8px; }
.person {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 26px; background: var(--panel); border: 1px solid var(--line);
}
.avatar {
  position: relative; flex: 0 0 88px; width: 88px; height: 88px;
  background: rgba(168, 131, 80, 0.18); border: 1px solid rgba(168, 131, 80, 0.5);
  overflow: hidden;
}
.avatar::before {
  content: attr(data-initials);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.8rem; color: var(--gold-hi);
}
.avatar img { position: relative; width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); display: block; }
.person-name { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.person-role { margin: 4px 0 12px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-hi); }
.person-bio { font-size: 0.92rem; line-height: 1.6; color: var(--cream-soft); }

@media (max-width: 760px) {
  .portal-nav { margin-left: 16px; gap: 18px; }
}
@media (max-width: 560px) {
  fieldset.choice { grid-template-columns: 1fr; }
  .statement { padding: 22px 18px; }
  .person { flex-direction: column; }
  .portal-bar { flex-wrap: wrap; }
  .portal-nav { order: 3; width: 100%; margin: 6px 0 0; }
}

/* ---------- Investor dashboard ---------- */
.dash-h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.2; margin: 6px 0 4px; }
.dash-sub { font-size: 0.92rem; color: var(--cream-soft); line-height: 1.5; }
.dash-empty { font-size: 0.92rem; color: var(--cream-soft); padding: 22px 24px; background: var(--panel); border: 1px dashed var(--line); }
.dash-intro {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  padding: 26px 28px; margin-bottom: 44px;
  background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--gold);
}
.dash-intro-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.dash-intro-actions .btn { min-width: 140px; }
.dash-intro-actions .dash-empty { padding: 0; border: 0; background: none; }
.dash-section { margin-bottom: 48px; }
.dash-section-head { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

.opp-list { display: grid; gap: 18px; }
.opp { padding: 28px; background: var(--panel); border: 1px solid var(--line); }
.opp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.opp-name { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin-top: 6px; }
.opp-summary { margin: 12px 0 18px; font-size: 0.95rem; line-height: 1.6; color: var(--cream-soft); max-width: 70ch; }
.chip {
  flex: 0 0 auto; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 10px; color: var(--gold-hi); border: 1px solid rgba(168,131,80,0.6); background: rgba(168,131,80,0.1);
}
.chip-small { margin-left: 10px; padding: 3px 7px; font-size: 0.58rem; vertical-align: middle; }
.opp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 20px; }
.opp-facts .fact { background: rgba(18,20,17,0.9); padding: 12px 14px; }
.opp-facts dt { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-faint); margin-bottom: 4px; }
.opp-facts dd { font-size: 1rem; }
.doc-head { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-soft); margin-bottom: 8px; }
.doc-list { list-style: none; border-top: 1px solid var(--line); margin-bottom: 22px; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.doc-links, .report-links { display: flex; justify-content: flex-end; gap: 18px; white-space: nowrap; }
.doc-links a, .report-links a { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); text-decoration: none; }
.doc-links a:hover, .report-links a:hover { color: var(--cream); }
.opp-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.opp-actions .btn { min-width: 220px; }
.opp-actions .btn[disabled] { cursor: default; opacity: 1; color: var(--cream-soft); border-color: var(--line); }
.opp-close { font-size: 0.85rem; color: var(--cream-soft); }

.report-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); font-size: 0.93rem; }
.report-table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-faint); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.report-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table tr.latest td { background: rgba(168,131,80,0.07); }

/* Register-interest dialog */
.dialog {
  margin: auto;
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  padding: 30px 30px 26px; color: var(--cream); background: #171915; border: 1px solid var(--line);
}
.dialog::backdrop { background: rgba(8, 9, 7, 0.72); }
.dialog .dash-h2 { margin-bottom: 20px; }
.field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 0.95rem; color: var(--cream);
  background: rgba(236, 232, 224, 0.06); border: 1px solid var(--line); border-radius: 0; resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--gold); }
.confirm-dark { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; line-height: 1.5; color: var(--cream-soft); margin: 4px 0 22px; cursor: pointer; }
.confirm-dark input { margin-top: 3px; accent-color: var(--gold); flex: 0 0 auto; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; }
.dialog-actions .btn { min-width: 0; }

@media (max-width: 640px) {
  .dash-intro { padding: 22px 18px; }
  .dash-intro-actions { width: 100%; }
  .dash-intro-actions .btn { flex: 1; min-width: 0; }
  .opp { padding: 22px 18px; }
  .opp-top { flex-direction: column-reverse; gap: 10px; }
  .opp-actions .btn { width: 100%; min-width: 0; }
  .doc-list li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .report-table thead { display: none; }
  .report-table, .report-table tbody, .report-table tr, .report-table td { display: block; width: 100%; }
  .report-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .report-table td { border: 0; padding: 4px 16px; }
  .report-table .report-links { justify-content: flex-start; padding-top: 4px; }
  .report-table td[data-label="Published"] { font-size: 0.82rem; color: var(--cream-soft); }
  .report-table td[data-label="Period"] { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); }
  .dialog { padding: 24px 18px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
}

/* ---------- Company enquiry (public) ---------- */
.criteria-cta { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.criteria-cta p { font-size: 0.95rem; color: var(--cream-soft); margin-bottom: 16px; line-height: 1.55; }
.criteria-cta .btn { width: 100%; }
.panel-wide { max-width: 720px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field select {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 1rem; color: var(--cream);
  background: rgba(236, 232, 224, 0.06); border: 1px solid var(--line); border-radius: 0; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cream-soft) 50%), linear-gradient(135deg, var(--cream-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
.field select option { color: #111; }
.field select:focus { outline: none; border-color: var(--gold); }
.field .hint { font-size: 0.8rem; color: var(--cream-faint); margin-top: 6px; }
.form-section { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-hi); margin: 10px 0 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.small-print { font-size: 0.8rem; line-height: 1.55; color: var(--cream-faint); margin-top: 18px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
