/* Shared layout for Tastola pages other than the InvestFellow product page.
   Tokens and fonts come from brand.css (loaded first). */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Skip link and visually hidden */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--card);
  color: var(--foreground);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.skip:focus {
  top: 0.75rem;
}

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

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header / nav — transparent so the body brass glow shows through */

.site-header {
  background: transparent;
  color: var(--foreground);
  padding-bottom: 3rem;
}

.site-header nav {
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5.25rem;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.brand img {
  height: 2rem;
  width: auto;
}

@media (prefers-color-scheme: light) {
  .brand img {
    filter: invert(1) sepia(0.35) brightness(0.5);
  }
}

.nav-desktop {
  display: flex;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a,
.mobile-menu a {
  color: var(--foreground);
  font-weight: 500;
  text-decoration: none;
}

.nav-desktop a:hover,
.mobile-menu a:hover {
  color: var(--primary);
}

.nav-desktop a[aria-current="page"],
.mobile-menu a[aria-current="page"] {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

.nav-cta {
  margin-left: 0.4rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--foreground);
  padding: 0;
  cursor: pointer;
  position: relative;
}

.nav-toggle-box,
.nav-toggle-box::before,
.nav-toggle-box::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: absolute;
  left: 11px;
}

.nav-toggle-box {
  top: 21px;
}

.nav-toggle-box::before,
.nav-toggle-box::after {
  content: "";
  left: 0;
}

.nav-toggle-box::before {
  top: -7px;
}

.nav-toggle-box::after {
  top: 7px;
}

.mobile-menu {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0 1rem;
}

.mobile-menu ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: min(100% - 2.5rem, var(--max));
}

.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu .btn {
  margin-top: 0.9rem;
  width: fit-content;
}

/* Type */

.hero h1,
.section h2,
.card h3,
.faq summary h3,
.dialog-card h2,
.footer-brand,
.price {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--foreground);
  line-height: 1.15;
}

.hero {
  width: min(100% - 2.5rem, var(--max));
  margin: 2.5rem auto 0;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
  max-width: 16em;
  margin: 0 0 0.9rem;
}

.hero .lead,
.hero .rating {
  max-width: 40rem;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.hero .rating {
  margin-top: 1.1rem;
  font-size: 1rem;
}

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

.hero-art {
  margin-top: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  max-width: 640px;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-foreground);
  text-decoration: none;
}

.btn-ghost,
.btn-dark,
.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible,
.btn-dark:hover,
.btn-dark:focus-visible,
.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--accent);
  color: var(--foreground);
  border-color: var(--border-strong);
}

/* Sections */

.section {
  padding: 4.25rem 0;
}

.section-paper {
  background: color-mix(in oklch, var(--secondary) 72%, var(--background));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.8rem;
}

.section p,
.prose {
  max-width: 42rem;
}

/* Long-form text (privacy policy): align with the page title, calmer headings */
.container.prose {
  margin-left: max(1.25rem, calc((100% - var(--max)) / 2));
  margin-right: auto;
}

.prose h2 {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  margin-top: 2rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.section p {
  margin: 0 0 0.9rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.shot {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
}

.card:hover,
.card:focus-visible {
  border-color: color-mix(in oklch, var(--brass) 45%, var(--border));
  text-decoration: none;
}

.card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  padding: 1rem 1.1rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.card-media.light {
  background: var(--muted);
}

.card-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.2rem 1.25rem 1.35rem;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 1.8rem;
}

.card p {
  margin: 0;
  max-width: none;
  color: var(--foreground);
}

.kicker {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  font-weight: 600;
}

.card-cta {
  margin-top: auto;
  padding-top: 0.4rem;
  font-weight: 600;
  color: var(--primary);
}

/* Notes, lists, panels */

.note {
  background: color-mix(in oklch, var(--brass) 8%, var(--card));
  border: 1px solid var(--border);
  border-left: 3px solid color-mix(in oklch, var(--brass) 70%, var(--border));
  color: var(--foreground);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  max-width: 42rem;
}

.note strong {
  color: var(--foreground);
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
  max-width: 42rem;
}

.steps li {
  margin: 0 0 0.55rem;
}

.checklist {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  max-width: 42rem;
}

.checklist li {
  position: relative;
  padding-left: 1.35rem;
  margin: 0 0 0.7rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brass);
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.4rem;
  background: var(--card);
  max-width: 40rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-top: 0;
}

/* PayPal iframe sits on its own light backing so gold/blue buttons stay readable. */
#paypal-button-container,
#paypal-button-container-harry {
  margin-top: 0.85rem;
  max-width: 24rem;
  padding: 0.85rem 0.75rem 0.45rem;
  background: oklch(1 0 0);
  border-radius: var(--radius);
}

.price {
  font-size: 3rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.75rem;
}

.price span {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted-foreground);
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  max-width: 42rem;
}

.faq summary {
  cursor: pointer;
  color: var(--foreground);
}

.faq summary h3 {
  display: inline;
  font-size: 1.4rem;
  margin: 0;
}

.faq details p {
  margin: 0.75rem 0 0.25rem;
}

/* Footer */

.site-footer {
  position: relative;
  background: var(--background);
  color: var(--muted-foreground);
  padding: 3.5rem 0 1.5rem;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--foreground);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 1.5rem;
}

.footer-brand {
  color: var(--foreground);
  font-size: 1.55rem;
  margin: 0 0 0.45rem;
}

.site-footer p {
  margin: 0 0 0.7rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 0.35rem 0;
}

.site-footer .copyright {
  width: min(100% - 2.5rem, var(--max));
  margin: 1.5rem auto 0;
  text-align: center;
  color: var(--muted-foreground);
}

.to-top {
  position: absolute;
  top: -1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.to-top:hover,
.to-top:focus-visible {
  background: var(--accent);
}

/* Dialog (PayPal success) */

.dialog[hidden] {
  display: none;
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.dialog-card {
  background: var(--card);
  color: var(--foreground);
  width: min(100%, 28rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.3rem 1.3rem;
}

.dialog-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
}

.dialog-card p {
  margin: 0 0 0.7rem;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .nav-desktop,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .split,
  .cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand img {
    height: 1.55rem;
  }

  .section {
    padding: 3rem 0;
  }

  .price {
    font-size: 2.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
