:root {
  --bg: #f7f2e9;
  --bg-soft: #f0e9dc;
  --panel: rgba(140, 30, 20, 0.035);
  --text: #241f1a;
  --muted: #6e6156;
  --line: rgba(90, 45, 35, 0.16);
  --accent: #a6281e;
  --accent-soft: rgba(166, 40, 30, 0.12);
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 85% 18%, rgba(166, 40, 30, 0.07), transparent 26%),
    linear-gradient(180deg, #faf6ee 0%, #f7f2e9 100%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 242, 233, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(90, 45, 35, 0.04);
}

.header-inner {
  min-height: 6.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a,
.site-footer a,
.site-footer p {
  color: var(--muted);
  transition: color 0.2s ease;
}

.site-nav a.nav-active,
.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible,
.contact-link:hover,
.contact-link:focus-visible,
.login-button:hover,
.login-button:focus-visible {
  color: var(--text);
}

.login-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.78rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(90, 45, 35, 0.02);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.login-button:hover,
.login-button:focus-visible {
  border-color: rgba(90, 45, 35, 0.18);
  background: rgba(90, 45, 35, 0.05);
}

.hero {
  min-height: calc(100vh - 5.75rem);
  display: flex;
  align-items: center;
}

.hero-layout {
  position: relative;
  padding: 5rem 0 7rem;
}

.hero-aside {
  position: absolute;
  top: 5.5rem;
  right: -1rem;
  width: 290px;
  display: flex;
  justify-content: flex-end;
  z-index: 2;
}

.hero-note {
  width: 100%;
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 1rem;
}

.hero-kicker {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 10vw, 9rem);
  line-height: 0.93;
  letter-spacing: -0.07em;
  font-weight: 700;
}

.hero-subtext {
  margin: 1.8rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-aside {
  display: flex;
  justify-content: flex-end;
}

.hero-note {
  width: 100%;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 1rem;
}

.note-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.section {
  padding: 4rem 0;
  scroll-margin-top: 5.75rem;
}

#home {
  scroll-margin-top: 0;
}

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

.section-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 760px);
  gap: 2rem 3rem;
  align-items: start;
}

.section-label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.section-content {
  display: grid;
  gap: 1.2rem;
}

.section-content p {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.65;
  letter-spacing: -0.02em;
}

.section-content p + p {
  color: var(--muted);
}

.contact-link {
  color: var(--accent);
  word-break: break-word;
}

/* Hero quote card */
.pull-quote {
  margin: 0;
}

.pull-quote p {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text);
}

.pull-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Contact form */
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(90, 45, 35, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.form-group textarea::placeholder {
  color: rgba(110, 97, 86, 0.5);
}

.form-group textarea:focus {
  border-color: var(--accent);
}

.contact-submit {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-top: 0.25rem;
}

.contact-submit:hover {
  opacity: 0.88;
}

.contact-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-content .contact-notice {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0.5rem;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Inactivity sign-out notice (dashboard) */
.timeout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.timeout-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem 2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  text-align: center;
}

.timeout-card h2 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.timeout-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.75rem;
  line-height: 1.6;
}

.timeout-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

.contact-feedback {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.5rem;
  background: rgba(80, 180, 80, 0.12);
  border: 1px solid rgba(80, 180, 80, 0.25);
  color: #6fcf6f;
  font-size: 0.85rem;
}

.contact-feedback--error {
  background: rgba(220, 80, 80, 0.12);
  border-color: rgba(220, 80, 80, 0.25);
  color: #e87171;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
}

.legal-disclaimer {
  font-size: 0.76rem;
  color: rgba(110, 97, 86, 0.55);
  line-height: 1.55;
  margin: 0.5rem 0 0;
  padding-bottom: 0.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
}

.nav-toggle span {
  width: 1rem;
  height: 2px;
  background: var(--text);
  display: block;
}

@media (max-width: 980px) {
  .section-grid {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    position: static;
    width: 100%;
    max-width: 32rem;
    justify-content: flex-start;
    margin-top: 2.5rem;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 1.5rem), var(--max-width));
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 1rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-actions {
    width: 100%;
    display: grid;
    gap: 1rem;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .login-button {
    justify-self: start;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding: 4rem 0 5rem;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 4.4rem);
    line-height: 1.02;
  }

  .hero-subtext,
  .section-content p {
    font-size: 1.02rem;
  }

  .section {
    padding: 2.75rem 0;
  }

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

/* ── Auth pages (login & reset-password) ── */

.auth-page {
  min-height: calc(100vh - 5.75rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem 2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
}

.auth-card h1 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  max-width: 100%;
}

.auth-card .subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(90, 45, 35, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input::placeholder {
  color: rgba(110, 97, 86, 0.5);
}

.form-group input:focus {
  border-color: var(--accent);
}

.password-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.password-row label {
  margin-bottom: 0;
}

.forgot-link {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.auth-btn {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-top: 0.5rem;
}

.auth-btn:hover {
  opacity: 0.88;
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-error {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.5rem;
  background: rgba(220, 80, 80, 0.12);
  border: 1px solid rgba(220, 80, 80, 0.25);
  color: #e87171;
  font-size: 0.85rem;
  display: none;
}

.auth-success {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.5rem;
  background: rgba(80, 180, 80, 0.12);
  border: 1px solid rgba(80, 180, 80, 0.25);
  color: #6fcf6f;
  font-size: 0.85rem;
  display: none;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 4.5rem;
}

.pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.pw-toggle:hover {
  color: var(--text);
}

/* Login-only: toggle between sign-in and forgot-password panels */
.forgot-form { display: none; }
.login-form-wrap { display: block; }

/* ── Investor dashboard ── */

.dashboard-page {
  min-height: calc(100vh - 5.75rem);
  padding: 3rem 0 5rem;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.dash-header h1 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
  max-width: 100%;
}

.dash-welcome {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.3rem 0 0;
}

.logout-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(90, 45, 35, 0.02);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.logout-btn:hover {
  border-color: rgba(90, 45, 35, 0.18);
  color: var(--text);
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.info-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
}

.info-card .card-label {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.info-card .card-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-height: 1.6rem;
}

.skeleton {
  background: linear-gradient(90deg, rgba(90, 45, 35, 0.06) 25%, rgba(90, 45, 35, 0.1) 50%, rgba(90, 45, 35, 0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 0.3rem;
  color: transparent !important;
  user-select: none;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Skeleton rows for the document list (loading state) */
.doc-row--skeleton {
  pointer-events: none;
}

.doc-row--skeleton .skel-icon {
  background: rgba(90, 45, 35, 0.06);
}

.doc-skel-text {
  flex: 1;
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.skel-line {
  height: 0.85rem;
  border-radius: 0.3rem;
}

.skel-line--lg { width: 60%; }
.skel-line--sm { width: 30%; height: 0.7rem; }

.skel-btn {
  flex-shrink: 0;
  width: 6rem;
  height: 1.7rem;
  border-radius: 999px;
}

/* Spinner used inside the Download button while a signed URL resolves */
.btn-spinner {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

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

/* Visually hidden but available to screen readers */
.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;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

.section-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.doc-section {
  margin-bottom: 3rem;
}

.doc-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.doc-section-header .section-title,
.doc-section-header .section-subtitle {
  margin-bottom: 0;
}

.doc-search-wrap {
  flex-shrink: 0;
}

.doc-search {
  appearance: none;
  -webkit-appearance: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.5rem 0.85rem;
  width: 220px;
  outline: none;
  transition: border-color 0.2s ease;
}

.doc-search::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.doc-search:focus {
  border-color: rgba(90, 45, 35, 0.22);
}

.doc-list {
  display: grid;
  gap: 0.5rem;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.folder-row:hover {
  border-color: rgba(90, 45, 35, 0.18);
  background: rgba(90, 45, 35, 0.04);
}

.folder-icon {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  background: rgba(166, 40, 30, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.folder-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--accent);
}

.folder-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.folder-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

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

.back-btn svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.breadcrumb span {
  color: var(--text);
}

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  transition: border-color 0.2s ease;
}

.doc-row:hover {
  border-color: rgba(90, 45, 35, 0.15);
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.doc-icon {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-name {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-type-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
}

.doc-type-badge.badge-pdf  { background: rgba(220, 80,  80,  0.12); color: #e87171; }
.doc-type-badge.badge-xlsx,
.doc-type-badge.badge-csv  { background: rgba(80,  180, 80,  0.12); color: #6fcf6f; }
.doc-type-badge.badge-docx { background: rgba(80,  120, 220, 0.12); color: #7da8e8; }

.doc-date {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.doc-download {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

.doc-download:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.doc-download:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.loading-state,
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  font-size: 0.95rem;
}

.loading-dot {
  display: inline-block;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.section-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 2.5rem;
}

@media (max-width: 760px) {
  .dash-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}


/* ===== v2 restyle — Castana Bend wordmark-inspired layer ===== */
.brand,
h1, h2, h3,
.hero h1,
.auth-card h1,
.section-label {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

.brand {
  font-size: clamp(1.65rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--accent);
  -webkit-text-stroke: 0.35px currentColor;
}

h1, .hero h1 { font-weight: 600; letter-spacing: 0.005em; }

.section-label {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

::selection { background: rgba(166, 40, 30, 0.18); }


/* ------------------------------------------------------------------ */
/* Castana Capital v2 (2026-08-20) — refined front page                */
/* Palette, type and portal styles inherited above from the v2 layer.  */
/* Contains NO journey / hills / regatta / crossing hooks.             */
/* ------------------------------------------------------------------ */

/* ---------- typographic rhythm ---------- */

.section {
  padding: 6.5rem 0;
}

@media (max-width: 760px) {
  .section { padding: 4.25rem 0; }
}

.section-grid {
  align-items: start;
}

.section-content p {
  max-width: 62ch;
}

/* ---------- hero ---------- */

.bend-hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 6.5rem;
}

.bend-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bend-backdrop svg {
  position: absolute;
  right: -14%;
  top: 50%;
  transform: translateY(-50%);
  width: min(72rem, 96%);
  height: auto;
  opacity: 0.5;
}

@media (max-width: 900px) {
  .bend-backdrop svg { right: -34%; opacity: 0.32; }
}

.bend-hero .hero-layout {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.hero-kicker::before {
  content: "";
  width: 2.1rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.55;
}

.bend-hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 2.8vw, 3.85rem);
  line-height: 1.09;
  margin: 0.55rem 0 0;
  max-width: 19ch;
  text-wrap: balance;
}

.bend-hero .hero-subtext {
  max-width: 46ch;
  font-size: 1.075rem;
  color: var(--muted);
}

/* ---------- buttons ---------- */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.82rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.22s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fdfaf4;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: #8d1f17;
  border-color: #8d1f17;
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--accent);
  border-color: rgba(166, 40, 30, 0.32);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn:focus-visible {
  outline: 2px solid rgba(166, 40, 30, 0.55);
  outline-offset: 3px;
}

.btn-arrow {
  transition: transform 0.22s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- principles ---------- */

.principles {
  border-top: 1px solid var(--line);
  padding: 5rem 0 5.5rem;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.25rem;
}

@media (max-width: 860px) {
  .principles-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.principle-num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.principle-rule {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 0.85rem 0 1.15rem;
}

.principle h3 {
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.004em;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.68;
  max-width: 34ch;
}

/* ---------- pull quote refinement ---------- */

.hero-aside .pull-quote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 2.75rem;
}

.footer-mark {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 1.35rem;
}

/* ---------- entrance (CSS only, motion-safe) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .bend-hero .hero-copy > *,
  .bend-hero .hero-aside {
    animation: castana-rise 0.72s cubic-bezier(0.22, 0.68, 0.32, 1) both;
  }

  .bend-hero .hero-copy > *:nth-child(1) { animation-delay: 0.04s; }
  .bend-hero .hero-copy > *:nth-child(2) { animation-delay: 0.11s; }
  .bend-hero .hero-copy > *:nth-child(3) { animation-delay: 0.18s; }
  .bend-hero .hero-copy > *:nth-child(4) { animation-delay: 0.25s; }
  .bend-hero .hero-aside { animation-delay: 0.34s; }

  .bend-backdrop svg path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    pathLength: 1;
    animation: castana-draw 2.6s ease-out 0.2s both;
  }
}

@keyframes castana-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes castana-draw {
  to { stroke-dashoffset: 0; }
}

/* ------------------------------------------------------------------ */
/* v3 (2026-08-20) — hero breathing room                               */
/* Fixes: narrow headline column, dead centre gap, faint motif.        */
/* ------------------------------------------------------------------ */

.bend-hero {
  padding: 4rem 0 5.5rem;
}

.bend-hero .hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: center;
  padding: 4rem 0 5rem;
}

.bend-hero .hero-copy {
  max-width: 44rem;
}

.bend-hero h1 {
  font-size: clamp(2.6rem, 1.35rem + 3.3vw, 4.15rem);
  line-height: 1.07;
  max-width: 24ch;
  margin: 0.7rem 0 0;
  text-wrap: balance;
}

.bend-hero .hero-subtext {
  margin-top: 1.9rem;
  max-width: 42ch;
  font-size: 1.115rem;
  line-height: 1.72;
}

.bend-hero .hero-actions {
  margin-top: 2.75rem;
}

/* aside: promoted out of absolute positioning into the grid */
.bend-hero .hero-aside {
  position: static;
  top: auto;
  right: auto;
  width: 100%;
  max-width: 24rem;
  justify-self: end;
  justify-content: flex-start;
}

.bend-hero .hero-note {
  padding: 1.75rem 1.75rem 1.85rem;
}

.bend-hero .hero-note p {
  font-size: 1.02rem;
  line-height: 1.72;
}

/* motif: brought inward and forward so it fills the centre */
.bend-backdrop svg {
  right: -8%;
  width: min(84rem, 112%);
  opacity: 0.95;
}

@media (max-width: 1100px) {
  .bend-hero .hero-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
  }
}

@media (max-width: 980px) {
  .bend-hero .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.75rem;
    padding: 3rem 0 4rem;
  }

  .bend-hero .hero-aside {
    max-width: 32rem;
    justify-self: start;
  }

  .bend-backdrop svg { right: -30%; opacity: 0.5; }
}

/* ------------------------------------------------------------------ */
/* v4 (2026-08-20) — the quote finds a home                            */
/* The pull-quote card floated over the contour motif on a translucent */
/* panel, so the lines ran through the text. Removed from the hero and */
/* set as its own band between Principles and Strategy.                */
/* ------------------------------------------------------------------ */

.bend-hero .hero-layout {
  display: block;
  padding: 4.5rem 0 5.5rem;
}

.bend-hero .hero-copy {
  max-width: 46rem;
}

.bend-hero h1 {
  font-size: clamp(2.8rem, 1.45rem + 3.7vw, 4.5rem);
  max-width: 20ch;
  line-height: 1.06;
}

.bend-hero .hero-subtext {
  max-width: 40ch;
}

.quote-band {
  border-top: 1px solid var(--line);
  padding: 6rem 0;
  background: rgba(140, 30, 20, 0.022);
}

.quote-band-inner {
  margin: 0 auto;
  max-width: 48rem;
  text-align: center;
}

.quote-band-inner::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin: 0 auto 2.25rem;
  background: var(--accent);
  opacity: 0.75;
}

.quote-band-inner p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 1.05rem + 1.7vw, 2.45rem);
  line-height: 1.34;
  letter-spacing: 0.004em;
  color: var(--text);
  text-wrap: balance;
}

.quote-band-inner cite {
  display: block;
  margin-top: 1.75rem;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-style: normal;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 760px) {
  .quote-band { padding: 4rem 0; }
  .quote-band-inner::before { margin-bottom: 1.75rem; }
}

/* ------------------------------------------------------------------ */
/* v5 (2026-08-20) — hills, edge to edge                               */
/* The motif was a one-sided diagonal anchored off the right edge,     */
/* which read as lopsided. Rebuilt as layered ridges spanning the full */
/* width and anchored to the horizon, with a faint echo at the footer. */
/* ------------------------------------------------------------------ */

.bend-backdrop {
  inset: auto 0 0 0;
  height: 58%;
}

.bend-backdrop svg {
  position: absolute;
  left: 0;
  right: auto;
  top: auto;
  bottom: 0;
  width: 100%;
  height: 100%;
  transform: none;
  opacity: 1;
}

.bend-hero .hero-layout {
  padding: 3.5rem 0 8.5rem;
}

.footer-ridge {
  width: 100%;
  line-height: 0;
  opacity: 0.55;
}

.footer-ridge svg {
  display: block;
  width: 100%;
  height: 5.5rem;
}

.site-footer {
  border-top: none;
  padding-top: 2.25rem;
}

@media (max-width: 980px) {
  .bend-backdrop { height: 46%; }
  .bend-backdrop svg { right: auto; opacity: 1; }
  .bend-hero .hero-layout { padding: 2.75rem 0 6.5rem; }
  .footer-ridge svg { height: 3.5rem; }
}

/* the draw-on animation now resolves correctly: pathLength="1" makes  */
/* stroke-dasharray:1 span the whole ridge instead of tiling 1px dashes */
@media (prefers-reduced-motion: no-preference) {
  .bend-backdrop svg g[fill="none"] path {
    animation: castana-draw 3.1s cubic-bezier(0.33, 0.9, 0.35, 1) 0.15s both;
  }
  .bend-backdrop svg g[fill="none"] path:nth-child(1) { animation-delay: 0.15s; }
  .bend-backdrop svg g[fill="none"] path:nth-child(2) { animation-delay: 0.32s; }
  .bend-backdrop svg g[fill="none"] path:nth-child(3) { animation-delay: 0.49s; }
  .bend-backdrop svg g[fill="none"] path:nth-child(4) { animation-delay: 0.66s; }

  .bend-backdrop svg g[fill] path { animation: none; }
}

/* ------------------------------------------------------------------ */
/* v6 (2026-08-20) — a quieter horizon                                 */
/* v5 was too wavy and carried the crimson into the landscape itself.  */
/* Ridges are now long-wavelength and shallow, drawn in the warm       */
/* neutral already used for hairlines. Crimson stays on brand elements.*/
/* ------------------------------------------------------------------ */

.bend-backdrop {
  inset: auto 0 0 0;
  height: 52%;
  opacity: 0.9;
}

.bend-backdrop svg {
  position: absolute;
  left: 0;
  right: auto;
  top: auto;
  bottom: 0;
  width: 100%;
  height: 100%;
  transform: none;
  opacity: 1;
}

.bend-hero .hero-layout {
  padding: 3.75rem 0 7.5rem;
}

/* footer returns to a plain rule */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 2.75rem;
}

@media (max-width: 980px) {
  .bend-backdrop { height: 40%; opacity: 0.75; }
  .bend-hero .hero-layout { padding: 2.75rem 0 5.5rem; }
}

/* settles in rather than drawing on — quieter for a background element */
@media (prefers-reduced-motion: no-preference) {
  .bend-backdrop svg path {
    animation: castana-haze 1.9s ease-out 0.25s both;
  }
}

@keyframes castana-haze {
  from { opacity: 0; }
}

/* ------------------------------------------------------------------ */
/* v7 (2026-08-20) — mountains                                         */
/* Curves replaced with angular peaks per the GP's sketch: three       */
/* receding ranges, irregular summit heights, sharp joins. Colour       */
/* unchanged from v6 (warm neutral, no crimson).                       */
/* ------------------------------------------------------------------ */

.bend-backdrop {
  height: 58%;
  opacity: 0.92;
}

.bend-hero .hero-layout {
  padding: 3.5rem 0 8rem;
}

@media (max-width: 980px) {
  .bend-backdrop { height: 44%; opacity: 0.8; }
  .bend-hero .hero-layout { padding: 2.75rem 0 6rem; }
}
