/* Marketing pages styling - The Board */

/* ============================================
   DESIGN TOKENS / VARIABLES
   ============================================ */

:root {
  /* Colors - Warm palette */
  --color-bg: #FFFBF7;
  --color-bg-alt: #F5EDE5;
  --color-text: #2C1810;
  --color-text-muted: #6B5B54;
  --color-accent: #C4533A;
  --color-accent-hover: #A3442F;
  --color-accent-light: #E8D5C4;
  --color-border: #E8DDD4;
  --color-white: #FFFFFF;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Font sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;

  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --max-width-narrow: 800px;
  --header-height: 4rem;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(44, 24, 16, 0.05);
  --shadow-md: 0 4px 6px rgba(44, 24, 16, 0.07);
  --shadow-lg: 0 10px 20px rgba(44, 24, 16, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--font-semibold);
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

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

.text-center {
  text-align: center;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-3xl) 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* ============================================
   HEADER
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.75rem;
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0;
}

.header__logo .the {
  font-weight: 300;
  color: var(--color-text-muted);
}

.header__logo .board {
  font-weight: 500;
}

.header__logo .cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--color-accent);
  margin-left: 0.12em;
  animation: blink-slow 1.5s step-end infinite;
}

@keyframes blink-slow {
  50% { opacity: 0; }
}

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

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header__nav a {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
}

.header__nav a:hover {
  color: var(--color-accent);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  line-height: 1.5;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-white);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn--secondary:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn--large {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-lg);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.hero__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-lg);
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SCREENSHOTS
   ============================================ */

.screenshots {
  padding: var(--space-2xl) 0;
}

.screenshots__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.6fr;
  gap: var(--space-lg);
  align-items: end;
}

.screenshots__item {
  background-color: var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.screenshots__item img {
  width: 100%;
  height: auto;
}

.screenshots__item--landscape {
  aspect-ratio: 16 / 10;
}

.screenshots__item--portrait {
  aspect-ratio: 9 / 16;
}

/* Placeholder for when no image */
.screenshots__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  height: 100%;
}

/* ============================================
   HOW IT WORKS
   ============================================ */

.how-it-works {
  text-align: center;
}

.how-it-works__title {
  margin-bottom: var(--space-2xl);
}

.how-it-works__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.step {
  text-align: center;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  border-radius: 50%;
  margin-bottom: var(--space-md);
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
}

.step__description {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.how-it-works__tagline {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-style: italic;
}

/* ============================================
   WEBSITE PREVIEW
   ============================================ */

.website-preview__title {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.website-preview__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Showcase layout with overlapping screenshots */
.website-preview__showcase {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
}

.website-preview__item {
  position: absolute;
  background-color: #e5e5e5;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.website-preview__item[data-hidden] {
  display: none;
}

/* Desktop 1 - back left */
.website-preview__item--desktop:nth-child(1) {
  left: calc(50% - 360px);
  top: 0;
  z-index: 5;
}

/* Desktop 2 - front, overlapping */
.website-preview__item--desktop:nth-child(2) {
  left: calc(50% - 170px);
  top: 60px;
  z-index: 10;
}

/* Mobile - right side */
.website-preview__item--mobile {
  left: calc(50% + 200px);
  top: 20px;
  z-index: 8;
}

/* Browser chrome titlebar - desktop only */
.website-preview__item--desktop::before {
  content: '';
  display: block;
  height: 28px;
  background: linear-gradient(to bottom, #e8e8e8, #d4d4d4);
  border-bottom: 1px solid #c0c0c0;
  background-image:
    radial-gradient(circle at 16px 14px, #ff5f57 5px, transparent 5px),
    radial-gradient(circle at 36px 14px, #febc2e 5px, transparent 5px),
    radial-gradient(circle at 56px 14px, #28c840 5px, transparent 5px);
}

.website-preview__item--desktop {
  width: 340px;
  height: 280px;
}

.website-preview__item--desktop .website-preview__image {
  width: 100%;
  height: calc(280px - 28px);
  object-fit: cover;
  object-position: center var(--img-offset, 0px);
  display: block;
}

/* Phone bezel for mobile */
.website-preview__item--mobile {
  width: 160px;
  height: 320px;
  background-color: #1a1a1a;
  border-radius: 18px;
  padding: 6px;
  box-sizing: border-box;
}

.website-preview__item--mobile::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 6px;
  background: #333;
  border-radius: 3px;
  z-index: 2;
}

.website-preview__item--mobile .website-preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center var(--img-offset, 0px);
  display: block;
  border-radius: 12px;
}

/* ============================================
   PRICING
   ============================================ */

.pricing {
  text-align: center;
}

.pricing__box {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.pricing__eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.pricing__description {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.pricing__price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-sm);
}

.pricing__terms {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.pricing__includes {
  text-align: left;
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.pricing__includes-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
}

.pricing__includes-list {
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.pricing__includes-list li {
  padding: var(--space-xs) 0;
  padding-left: var(--space-lg);
  position: relative;
}

.pricing__includes-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: var(--font-bold);
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
  text-align: center;
}

.contact__title {
  margin-bottom: var(--space-sm);
}

.contact__subtitle {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* Postcard Map */
.contact__postcard {
  margin-top: var(--space-3xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact__map-container {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(44, 24, 16, 0.08),
    0 10px 30px rgba(44, 24, 16, 0.12);
  border: 8px solid var(--color-white);
  background: var(--color-white);
}

.contact__map {
  display: block;
  width: 100%;
  height: 280px;
  border: none;
}

.contact__map-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000; /* Above Leaflet tiles */
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  pointer-events: none;
  padding: var(--space-md);
}

/* Postcard SVG labels */
.contact__map-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.contact__map-svg {
  display: block;
  height: auto;
}

.contact__map-svg--top {
  width: 200px;
}

.contact__map-svg--bottom {
  width: 360px;
  margin-top: -12px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
  list-style: none;
}

.footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer__links a:hover {
  color: var(--color-accent);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Medium screens: scale down, keep all three */
@media (max-width: 1024px) {
  .website-preview__showcase {
    height: 320px;
  }

  .website-preview__item--desktop {
    width: 260px;
    height: 220px;
  }

  .website-preview__item--desktop .website-preview__image {
    height: calc(220px - 28px);
  }

  .website-preview__item--desktop:nth-child(1) {
    left: calc(50% - 280px);
    top: 0;
  }

  .website-preview__item--desktop:nth-child(2) {
    left: calc(50% - 130px);
    top: 50px;
  }

  .website-preview__item--mobile {
    width: 120px;
    height: 240px;
    left: calc(50% + 150px);
    top: 20px;
  }
}

@media (max-width: 768px) {
  :root {
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-2xl: 1.25rem;
  }

  .header__nav {
    gap: var(--space-sm);
  }

  .header__nav a {
    font-size: var(--text-xs);
  }

  .header__logo {
    font-size: 1.5rem;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .screenshots__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .screenshots__item--portrait {
    grid-column: span 2;
    max-width: 200px;
    justify-self: center;
  }

  .how-it-works__steps {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .website-preview__showcase {
    height: auto;
  }

  /* Show only second desktop, centered */
  .website-preview__item--desktop:nth-child(1) {
    display: none;
  }

  .website-preview__item--desktop:nth-child(2) {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 400px;
    height: 280px;
    margin: 0 auto;
  }

  .website-preview__item--desktop:nth-child(2) .website-preview__image {
    height: calc(280px - 28px);
  }

  .website-preview__item--mobile {
    display: none;
  }

  .pricing__box {
    padding: var(--space-lg);
  }

  .contact__postcard {
    margin-top: var(--space-2xl);
  }

  .contact__map {
    height: 220px;
  }

  .footer__links {
    flex-wrap: wrap;
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .screenshots__grid {
    grid-template-columns: 1fr;
  }

  .screenshots__item--portrait {
    grid-column: span 1;
  }

  .contact__map-container {
    border-width: 6px;
  }

  .contact__map {
    height: 200px;
  }

  .contact__map-svg--top {
    width: 140px;
  }

  .contact__map-svg--bottom {
    width: 250px;
    margin-top: -8px;
  }
}

/* ============================================
   PRICING PAGE
   ============================================ */

/* Pricing Hero */
.pricing-hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
}

.pricing-hero__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

.pricing-hero__subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Founding Member Banner */
.founding-banner {
  padding: var(--space-lg) 0;
}

.founding-banner__box {
  background: linear-gradient(135deg, var(--color-accent) 0%, #a84532 100%);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.founding-banner__eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: var(--space-sm);
}

.founding-banner__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-md);
  color: var(--color-white);
}

.founding-banner__description {
  font-size: var(--text-lg);
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

.founding-banner__box .btn {
  background-color: var(--color-white);
  color: var(--color-accent);
}

.founding-banner__box .btn:hover {
  background-color: var(--color-bg);
}

/* Pricing Tiers */
.pricing-tiers__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.tier {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  position: relative;
}

.tier--featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-lg);
}

.tier__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-md);
  border-radius: 100px;
}

.tier__header {
  text-align: center;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.tier__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
}

.tier__price {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.tier__amount {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
}

.tier__description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.tier__features {
  list-style: none;
  flex: 1;
  margin-bottom: var(--space-lg);
}

.tier__features li {
  padding: var(--space-sm) 0;
  padding-left: var(--space-lg);
  position: relative;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.tier__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: var(--font-bold);
}

.tier__footer {
  text-align: center;
}

.tier__addon {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.tier__footer .btn {
  width: 100%;
}

/* Hardware Section */
.hardware__title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.hardware__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.hardware__item {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.hardware__item h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.hardware__price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.hardware__description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* FAQ Section */
.faq__title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.faq__list {
  max-width: 700px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq__question {
  display: block;
  padding: var(--space-lg) 0;
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: var(--space-xl);
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  font-weight: var(--font-normal);
}

.faq__item[open] .faq__question::after {
  content: "−";
}

.faq__answer {
  padding-bottom: var(--space-lg);
}

.faq__answer p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* CTA Section */
.cta {
  text-align: center;
}

.cta__title {
  margin-bottom: var(--space-sm);
}

.cta__subtitle {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* Pricing Page Responsive */
@media (max-width: 768px) {
  .pricing-tiers__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .tier--featured {
    order: -1;
  }

  .hardware__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .founding-banner__box {
    padding: var(--space-xl);
  }

  .founding-banner__description {
    font-size: var(--text-base);
  }
}
