/* Tovren Capital, a fictional wealth manager for Pantile's white-label demos.
   Palette: spruce and birch, with lichen as the one accent, used on dark
   ground only. The ridgeline under the home page hero is the one loud thing;
   everything else stays quiet. */

:root {
  --spruce: #18342f;
  --spruce-raised: #22453e;
  --birch: #f3f5f2;
  --fog: #e2e8e3;
  --stone: #5c6862;
  --lichen: #c6d39b;
  --white: #ffffff;
  --on-dark-muted: #c3cec8;
  --line: #cfd8d2;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --mark-bg: var(--spruce);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--birch);
  color: var(--spruce);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--spruce);
  outline-offset: 3px;
  border-radius: 4px;
}

.on-dark :focus-visible {
  outline-color: var(--lichen);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--spruce);
  color: var(--birch);
  border-radius: 6px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- type */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 6.2vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}

.heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.subheading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--stone);
  max-width: 36rem;
}

.muted {
  color: var(--stone);
}

.small {
  font-size: 0.9rem;
}

.text-link {
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-solid {
  background: var(--spruce);
  color: var(--birch);
}

.btn-solid:hover {
  background: var(--spruce-raised);
}

.btn-quiet {
  border-color: rgba(24, 52, 47, 0.28);
  color: var(--spruce);
}

.btn-quiet:hover {
  border-color: var(--spruce);
}

.btn-light {
  background: var(--lichen);
  color: var(--spruce);
}

.btn-light:hover {
  background: #d6e1b0;
}

.btn-wide {
  width: 100%;
  padding-block: 0.85rem;
}

/* -------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 245, 242, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--fog);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 76px;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.mark-bg {
  fill: var(--mark-bg);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--stone);
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--spruce);
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.nav-actions {
  display: flex;
  gap: 0.6rem;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(24, 52, 47, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--spruce);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .nav-open .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem var(--gutter) 1.75rem;
    background: var(--birch);
    border-bottom: 1px solid var(--fog);
  }

  .nav-open .nav-links {
    flex-direction: column;
    gap: 0.9rem;
  }

  .nav-open .nav-actions .btn {
    flex: 1;
  }
}

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

.hero {
  padding-top: clamp(56px, 9vw, 112px);
}

.hero .display {
  max-width: 13ch;
}

.hero .lede {
  margin-top: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

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

.horizon {
  width: 100%;
  height: clamp(150px, 24vw, 340px);
  margin-top: clamp(40px, 6vw, 72px);
  margin-bottom: -1px; /* no hairline seam where the near ridge meets the dark band */
  pointer-events: none;
}

/* wide screens: the ridges rise into the empty right half beside the
   headline, while their low left end stays under the text */
@media (min-width: 1100px) {
  .hero .horizon {
    margin-top: -150px;
  }
}

.horizon path {
  transform-box: fill-box;
  animation: ridge-rise 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.horizon path:nth-child(2) {
  animation-delay: 0.12s;
}

.horizon path:nth-child(3) {
  animation-delay: 0.24s;
}

.horizon path:nth-child(4) {
  animation-delay: 0.36s;
}

@keyframes ridge-rise {
  from {
    transform: translateY(28px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .horizon path {
    animation: none;
  }
}

/* --------------------------------------------------------- dark bands */

.band-dark {
  background: var(--spruce);
  color: var(--birch);
}

.band-dark .muted,
.band-dark p {
  color: var(--on-dark-muted);
}

.commitments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px) var(--section);
}

.commitments h2 {
  color: var(--birch);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.commitments h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 1.1rem;
  background: var(--lichen);
}

/* ------------------------------------------------------------ sections */

.section {
  padding-block: var(--section);
}

.section-fog {
  background: var(--fog);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.split-intro .lede {
  margin-top: 1.25rem;
}

.split-intro .text-link {
  display: inline-block;
  margin-top: 1.75rem;
}

.service-list li {
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}

.service-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.service-list h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.service-list p {
  color: var(--stone);
  max-width: 38rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head .lede {
  margin-top: 1rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 3.25rem;
  line-height: 1;
  margin-bottom: 1.25rem;
  color: var(--spruce);
}

.steps h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.steps p {
  color: var(--stone);
}

.article-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.article-row li {
  padding-top: 1.25rem;
  border-top: 2px solid var(--spruce);
}

.article-meta {
  color: var(--stone);
  font-size: 0.9rem;
}

.article-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.25;
  margin-top: 0.5rem;
}

/* ---------------------------------------------------------- client band */

.client-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-band > div {
  padding-right: clamp(0px, 4vw, 56px);
}

.client-band > div + div {
  padding-left: clamp(24px, 4vw, 56px);
  border-left: 1px solid var(--line);
}

.client-band p {
  margin-top: 0.6rem;
  margin-bottom: 1.5rem;
  color: var(--stone);
  max-width: 26rem;
}

/* ------------------------------------------------------------ subpages */

.page-head {
  padding-block: clamp(56px, 8vw, 100px) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--fog);
}

.page-head .lede {
  margin-top: 1.5rem;
}

.prose {
  max-width: 40rem;
}

.prose p + p {
  margin-top: 1.1rem;
}

.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 80px);
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.service-detail:first-child {
  border-top: 0;
}

.service-detail ul {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.55rem;
}

.service-detail li {
  padding-left: 1.25rem;
  position: relative;
}

.service-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background: var(--spruce);
}

.fee-table {
  width: 100%;
  max-width: 34rem;
  margin-top: 1.5rem;
  border-collapse: collapse;
}

.fee-table th,
.fee-table td {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}

.fee-note {
  caption-side: bottom;
  padding-top: 0.9rem;
  color: var(--stone);
  font-size: 0.9rem;
  text-align: left;
}

.fee-table td {
  text-align: right;
  font-family: var(--serif);
  font-size: 1.2rem;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.principles h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.team {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.avatar {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--fog);
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--spruce);
}

.team h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.insight-list li {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(16px, 4vw, 64px);
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.insight-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.insight-list .article-title {
  margin-top: 0;
}

.insight-list p {
  margin-top: 0.6rem;
  color: var(--stone);
  max-width: 40rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}

.contact-facts {
  display: grid;
  gap: 1.75rem;
}

.contact-facts dt {
  color: var(--stone);
  font-size: 0.9rem;
}

.contact-facts dd {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------- forms */

.form {
  display: grid;
  gap: 1.15rem;
}

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

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #b6c2bb;
  border-radius: 6px;
  background: var(--white);
  color: var(--spruce);
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--spruce);
  outline: 2px solid var(--spruce);
  outline-offset: 0;
}

.field-hint {
  margin-top: 0.35rem;
  color: var(--stone);
  font-size: 0.85rem;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.95rem;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--spruce);
}

.form-notice {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--spruce);
  background: var(--fog);
  font-size: 0.95rem;
}

.form-notice:focus {
  outline: none;
}

/* --------------------------------------------------------- auth pages */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 100vh;
}

.auth-aside {
  --mark-bg: #2a4c44;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 36px clamp(28px, 4vw, 56px) 0;
  background: var(--spruce);
  color: var(--birch);
}

.auth-aside .brand-name {
  color: var(--birch);
}

.auth-pitch {
  margin-top: clamp(48px, 10vh, 120px);
  max-width: 24rem;
}

.auth-pitch h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 400;
  line-height: 1.22;
}

.auth-pitch p {
  margin-top: 1rem;
  color: var(--on-dark-muted);
}

.auth-aside .horizon {
  height: clamp(120px, 18vw, 220px);
  margin-inline: calc(-1 * clamp(28px, 4vw, 56px));
  width: auto;
}

.auth-main {
  display: flex;
  flex-direction: column;
  padding: 28px clamp(24px, 5vw, 72px) 40px;
}

.auth-top {
  display: flex;
  justify-content: flex-end;
}

.auth-form {
  width: 100%;
  max-width: 27rem;
  margin: auto;
  padding-block: 40px;
}

.auth-form .heading {
  margin-bottom: 0.5rem;
}

.auth-form > .muted {
  margin-bottom: 2rem;
}

.auth-switch {
  margin-top: 1.75rem;
  color: var(--stone);
}

.auth-switch a {
  color: var(--spruce);
}

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

.site-footer {
  --mark-bg: #2a4c44;
  background: var(--spruce);
  color: var(--birch);
  padding-block: clamp(48px, 6vw, 80px) 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem clamp(32px, 6vw, 96px);
}

.footer-grid p {
  color: var(--on-dark-muted);
}

.footer-about p {
  margin-top: 1rem;
  max-width: 22rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 4rem;
  align-items: start;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--birch);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-legal {
  grid-column: 1 / -1;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(243, 245, 242, 0.16);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .commitments,
  .steps,
  .article-row,
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .split,
  .service-detail,
  .contact-grid,
  .footer-grid,
  .insight-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .client-band > div,
  .client-band > div + div {
    padding: 2rem 0;
    border-left: 0;
  }

  .client-band > div + div {
    border-top: 1px solid var(--line);
  }

  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-pitch,
  .auth-aside .horizon {
    display: none;
  }

  .auth-aside {
    padding-bottom: 24px;
  }
}

@media (max-width: 560px) {
  .form-row,
  .team {
    grid-template-columns: minmax(0, 1fr);
  }
}
