:root {
  --background: #f4f0e8;
  --surface: #ebe5da;
  --text: #2f302b;
  --muted: #6f746a;
  --accent: #6f7a5a;
  --accent-dark: #566046;
  --border: #d8d1c5;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

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

.hidden {
    display: none;
}
/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 10px;

  background-color: var(--background);
}

.site-header {
  transition: transform 0.6s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.site-logo {
  display: block;
  width: 120px;
  height: auto;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.main-nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
}

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

/* Main layout */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Shared labels */

.eyebrow,
.section-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 16px;
  color: var(--accent);
  font-weight: bold;
}

/* Homepage hero */

.hero {
  text-align: center;
  padding: 55px 20px 120px;
}

.hero h2 {
  max-width: 800px;
  margin: 14px auto 20px;
  font-size: 56px;
  line-height: 1.1;
  font-weight: normal;
}

.hero-text {
  max-width: 700px;
  margin: 0 auto;
  font-size: 18px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* Buttons */

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: 0.2s ease;
}

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

.primary-button:hover {
  background-color: var(--accent-dark);
}

.secondary-button:hover {
  background-color: var(--surface);
}

/* Featured reflection */

.featured-reflection {
  max-width: 760px;
  margin: 0 auto;
  padding: 70px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.featured-reflection blockquote {
  margin: 20px auto 10px;
  font-size: 30px;
  line-height: 1.4;
  font-style: italic;
}

.quote-source {
  color: var(--muted);
  margin-bottom: 28px;
}

/* Explore cards */

.explore-section {
  padding: 100px 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 44px;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: 38px;
  font-weight: normal;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.explore-card {
  background-color: var(--surface);
  padding: 30px;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.explore-card h3 {
  margin-top: 0;
  font-size: 24px;
}

.explore-card p {
  color: var(--muted);
}

.explore-card a {
  color: var(--accent-dark);
  font-weight: bold;
}

/* Mailing list */

.mailing-list {
  max-width: 760px;
  margin: 30px auto 100px;
  padding: 60px 40px;
  background-color: var(--surface);
  border-radius: 20px;
  text-align: center;
}

.mailing-list h2 {
  margin: 8px 0 12px;
  font-size: 36px;
  font-weight: normal;
}

.signup-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}

.signup-form input {
  min-width: 280px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--white);
  font: inherit;
}

.signup-form button {
  padding: 13px 20px;
  border: none;
  border-radius: 999px;
  background-color: var(--accent);
  color: var(--white);
  font: inherit;
  cursor: pointer;
}

.signup-form button:hover {
  background-color: var(--accent-dark);
}

.form-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.weekly-reflection-subscribed {
  max-width: 520px;
  margin: 28px auto 0;
  text-align: center;
  color: var(--muted);
}

.weekly-reflection-subscribed strong {
  color: var(--text);
}

.subscription-reset-button {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px 50px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

/* Page introductions */

.page-intro {
  max-width: 760px;
  margin: 0 auto;
  padding: 90px 20px 70px;
  text-align: center;
}

.page-intro h2 {
  margin: 12px 0 18px;
  font-size: 48px;
  line-height: 1.2;
  font-weight: normal;
}

.page-intro p:last-child {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

/* Reflections page */

.weekly-reflection {
  max-width: 760px;
  margin: 0 auto;
  padding: 70px 20px;
  border-top: 1px solid var(--border);
}

.weekly-reflection .section-label {
  text-align: center;
}

.weekly-reflection h2 {
  margin: 10px 0 30px;
  font-size: 38px;
  line-height: 1.25;
  font-weight: normal;
  text-align: center;
}

.weekly-reflection p {
  font-size: 18px;
}

.reflection-question {
  margin-top: 36px;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
  font-style: italic;
}

.east-west-section {
  padding: 100px 0;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.philosophy-card {
  padding: 36px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.card-tradition {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: bold;
  color: var(--accent);
}

.philosophy-card h3 {
  margin: 8px 0 18px;
  font-size: 26px;
}

.philosophy-card blockquote {
  margin: 0 0 22px;
  font-size: 22px;
  line-height: 1.5;
  font-style: italic;
}

.philosophy-card p:last-child {
  color: var(--muted);
}

.thought-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.large-quote {
  margin: 20px auto 10px;
  font-size: 30px;
  line-height: 1.45;
  font-style: italic;
}

.reflection-links {
  padding: 100px 0;
}

.reflection-links .explore-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  max-width: 760px;
  margin: 0 auto;
}

/* Marketplace */

.marketplace-section,
.resource-section {
  padding: 20px 0 90px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.product-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
}

.product-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  margin-bottom: 24px;
  border-radius: 14px;
  background-color: #ded8cc;
  color: var(--muted);
  font-size: 14px;
}

.product-image {
  display: block;
  width: 100%;
  height: 300px;
  margin-bottom: 24px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
}

.product-category {
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: bold;
  color: var(--accent);
}

.product-card h3 {
  margin: 0;
  font-size: 26px;
}

.product-author {
  margin: 4px 0 18px;
  color: var(--muted);
  font-style: italic;
}

.product-card p {
  color: var(--muted);
}

.product-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-dark);
  font-weight: bold;
}

.affiliate-note {
  max-width: 760px;
  margin: 10px auto 90px;
  padding: 34px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.affiliate-note p:last-child {
  color: var(--muted);
}

/* I Ching page */

.iching-intro {
  padding-bottom: 40px;
}

.consultation-section {
  padding: 20px 0 70px;
}

.consultation-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

/* I Ching prompt */

.question-area {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.question-area h2 {
  margin: 8px 0 14px;
  font-size: 34px;
  line-height: 1.25;
  font-weight: normal;
}

.question-area > p {
  color: var(--muted);
}

.cast-button {
  align-self: flex-start;
  margin-top: 18px;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background-color: var(--accent);
  color: var(--white);
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.cast-button:hover {
  background-color: var(--accent-dark);
}

.cast-button:disabled {
  opacity: 0.65;
  cursor: default;
}

/* Hexagram */

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

.hexagram-display {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 300px;
  min-height: 200px;
  margin: 12px auto 0;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background-color: var(--background);
}

.hexagram-placeholder span {
  display: block;
  margin-bottom: 12px;
  font-size: 64px;
  color: var(--accent);
}

.hexagram-placeholder p {
  margin: 0;
  color: var(--muted);
}

.hexagram-line {
  position: relative;
  width: 190px;
}

.moving-marker {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.moving-line-key {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.3px;
}

.yang-line {
  height: 14px;
  background-color: var(--text);
  border-radius: 999px;
}

.yin-line {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.yin-line div {
  width: 83px;
  height: 14px;
  background-color: var(--text);
  border-radius: 999px;
}

/* Hexagram animation */

.line-reveal {
  opacity: 0;
  animation: revealLine 1.8s ease forwards;
}

@keyframes revealLine {
  from {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
  }

  to {
    opacity: 1;
    transform: scaleX(1);
    transform-origin: left;
  }
}

/* Inline reading */

.inline-reading {
  margin-top: 18px;
  text-align: center;
}

.inline-reading h2 {
  margin: 0 0 10px;
  font-size: 27px;
  line-height: 1.3;
  font-weight: normal;
}

.inline-reading p {
  max-width: 500px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.transformation-note {
  max-width: 460px;
  margin: 4px auto 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Deep reading */

.deep-reading-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 30px 20px 70px;
}

.deep-reading-preview {
  padding: 36px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: center;
}

.deep-reading-preview h3 {
  margin: 8px 0 12px;
  font-size: 26px;
}

.deep-reading-preview p {
  color: var(--muted);
}

.secondary-action {
  margin-top: 12px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: transparent;
  color: var(--muted);
  font: inherit;
}

/* I Ching note */

.consultation-note {
  max-width: 760px;
  margin: 20px auto 100px;
  padding: 36px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.consultation-note p:last-child {
  color: var(--muted);
}

/* Share I Ching reading */

.share-reading-area {
  margin-top: 28px;
  text-align: center;
}

.share-reading-button {
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background-color: var(--accent);
  color: var(--white);
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.share-reading-button:hover:not(:disabled) {
  background-color: var(--accent-dark);
}

.share-reading-button:disabled {
  opacity: 0.65;
  cursor: default;
}

.share-status {
  max-width: 420px;
  margin: 10px auto 0 !important;
  color: var(--muted);
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* Responsive */

@media (max-width: 800px) {
  .site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 20px 8px;
}

  .site-logo {
    width: 100px;
  }

.brand h1 {
  font-size: 24px;
}

.brand p {
  font-size: 13px;
}

.menu-toggle {
  display: block;
}

.main-nav {
  display: none;
  position: absolute;
  top: 82px;
  left: 20px;
  right: 20px;
  z-index: 10;
  flex-direction: column;
  gap: 0;
  padding: 6px 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
}

.main-nav.open {
  display: flex;
}

.main-nav a {
  padding: 10px 16px;
}

  .hero {
    padding: 18px 16px 56px;
  }

  .hero h2 {
    font-size: 36px;
  }

  .hero-text {
  font-size: 16px;
  line-height: 1.55;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .featured-reflection {
    padding: 48px 16px;
  }
  
  .featured-reflection blockquote {
    font-size: 25px;
    line-height: 1.4;
  }
  
  .quote-source {
    margin-bottom: 20px;
  }
  
  .featured-reflection > p:last-child {
    font-size: 16px;
    line-height: 1.55;
  }

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

  .explore-section {
    padding: 60px 0;
  }

  .section-heading h2 {
    font-size: 28px;
    line-height: 1.2;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
    padding: 20px 20px;
  }

  .site-footer > p {
    order: 2;
    margin: 0;
  }

  .footer-links {
    justify-content: center;
    order: 1;
  }

  .page-intro {
    padding: 10px 16px 34px;
  }

  .page-intro h2 {
    font-size: 28px;
    line-height: 1.15;
    margin-bottom: 14px;
  }

  .page-intro p:last-child {
  font-size: 16px;
  line-height: 1.55;
}

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

  .marketplace-section .section-heading {
    margin-top: -30px;
}

  .marketplace-intro {
    padding-bottom: 15px;
}

  .marketplace-section {
    padding: 55px 0;
}

.resource-section {
    padding: 35px 0 55px;
}

  .reflection-links .explore-grid {
    grid-template-columns: 1fr;
  }

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

  .consultation-section {
  padding: 0 0 40px;
  }

  .consultation-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 18px;
  }

  .consultation-note {
    margin: 20px auto 60px;
    padding: 30px 18px;
  }

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

  .question-area h2 {
    font-size: 28px;
    line-height: 1.2
  }

  .cast-button {
    align-self: center;
    margin-top: 12px;
    padding: 8px 22px;
  }

  .hexagram-display {
  width: 100%;
  max-width: 280px;
  min-height: 220px;
  margin: 10px auto 0;
  padding: 16px 14px;
  gap: 9px;
}


  .hexagram-area .section-label {
  margin-bottom: 8px;
}

  .hexagram-line {
    width: 170px;
  }

  .yang-line {
  height: 12px;
}

  .yin-line {
    gap: 20px;
  }


  .yin-line div {
  width: 75px;
  height: 12px;
}

  .inline-reading h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .inline-reading {
    margin-top: 10px;
  }

  .inline-reading p {
  font-size: 15px;
  line-height: 1.5;
}

.transformation-note {
  margin: 2px auto 8px;
  font-size: 13px;
  line-height: 1.4;
}

.transformed-reading h3 {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.2;
}

.transformed-reading p {
  margin-bottom: 0;
}

  .deep-reading-section {
    padding: 20px 0 40px;
  }

  .deep-reading-preview {
    padding: 30px 22px;
  }

  .mailing-list {
    margin: 10px auto 60px;
  }

  .mailing-list h2 {
    font-size: 28px;
    line-height: 1.2;
  }

  .weekly-reflection {
    padding: 40px 16px 10px;
}

.weekly-reflection h2 {
    font-size: 28px;
    line-height: 1.2;
}

.east-west-section .section-heading {
    margin-top: 20px;
    margin-bottom: 60px;
}

.east-west-section {
    padding: 20px 0 60px;
}

.thought-section {
    padding: 40px 16px;
}

.large-quote {
    font-size: 24px;
    line-height: 1.4;
}

.reflection-links {
   padding: 60px 0;
}

.marketplace-section,
.resource-section {
  padding: 55px 0;
}

.affiliate-note {
  margin: 10px auto 55px;
  padding: 28px 18px;
}
}
