/* TantraGuru homepage, direction A (השולחן). Layout and components.
   RTL, logical properties only. Section rhythm alternates ground and band. */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg-page);
  font-synthesis: none;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
h1 { font-size: var(--fs-display); line-height: var(--lh-display); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 500; }

p { margin: 0; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--color-yam);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.skip-link {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Containers and section rhythm */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.band { background: var(--bg-band); }

.text-body { color: var(--ink-body); font-size: var(--fs-body); line-height: var(--lh-body); }
.text-small { color: var(--ink-caption); font-size: var(--fs-small); line-height: var(--lh-small); }
.text-caption { color: var(--ink-caption); font-size: var(--fs-caption); line-height: 1.5; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Eyebrow with rimon rule */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-overline);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-rimon);
}
.eyebrow::before {
  content: "";
  flex: 0 0 40px;
  height: 2px;
  background: currentColor;
}
.eyebrow.is-yam { color: var(--color-yam); }
@media (min-width: 1024px) { .eyebrow::before { flex-basis: 48px; } }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-block-end: var(--s-6);
}
.section-head .lede { max-width: 56ch; }
@media (min-width: 1024px) {
  .section-head.is-split {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--s-6);
  }
  .section-head.is-split .lede { max-width: 460px; }
  .section-head { margin-block-end: var(--s-7); }
}
.section-head .title-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s-6);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 1.5px solid transparent;
  isolation: isolate;
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
  will-change: transform;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-medium); }
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--color-rimon); color: var(--n-0); border-color: var(--color-rimon); }
.btn-primary:hover { color: var(--n-0); }
.btn-secondary { background: transparent; color: var(--color-yam); border-color: var(--color-yam); }
.btn-secondary:hover { color: var(--color-yam); }
.btn-compact { min-height: 44px; padding: 0 var(--s-5); font-size: var(--fs-small); }

/* Lamp emphasis (10%): a single radial glow behind the active CTA, opacity only */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 28px 8px rgba(180, 30, 72, 0.32);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--dur-normal) var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) { .btn-primary:hover::before { opacity: 1; } }
.btn-primary:focus-visible::before { opacity: 1; }

/* Cards: conversation cards, 60% of the page */
.card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-low);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
@media (min-width: 1024px) { .card { padding: 28px; } }
a.card { color: inherit; text-decoration: none; }
.card-link { font-weight: 600; font-size: 1rem; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* Breath (30%): the card back carries a ring fragment that shows on hover, opacity only */
.card::after {
  content: "";
  position: absolute;
  inline-size: 160px;
  block-size: 160px;
  inset-inline-end: -70px;
  inset-block-end: -70px;
  border-radius: 50%;
  border: 6px solid var(--color-yam);
  opacity: 0;
  transition: opacity var(--dur-normal) var(--ease-out);
  pointer-events: none;
}
.card.is-rimon::after { border-color: var(--color-rimon); }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-medium); }
  .card:hover::after { opacity: 0.12; }
}

/* Header */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: var(--bg-page);
  border-block-end: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--s-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand .mark { inline-size: 72px; block-size: 48px; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  line-height: 1;
  color: var(--ink);
}
.nav-links {
  display: none;
  align-items: center;
  gap: var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}
.nav-links a:hover { color: var(--color-rimon); }
.nav-toggle {
  inline-size: 44px;
  block-size: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { inline-size: 22px; block-size: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-drawer {
  display: none;
  padding-block: var(--s-4) var(--s-5);
  border-block-start: 1px solid var(--line);
}
.nav-drawer.is-open { display: block; }
.nav-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.nav-drawer a:not(.btn) {
  display: block;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.0625rem;
}
.nav-drawer .btn { margin-block-start: var(--s-3); }

@media (min-width: 1024px) {
  .nav { min-height: 88px; }
  .brand-name { font-size: 1.375rem; }
  .nav-links { display: flex; }
  .nav-toggle, .nav-drawer { display: none; }
  .nav-drawer.is-open { display: none; }
}

/* 1. Hero */
.hero { padding-block: 40px 56px; }
.hero-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.hero-mark {
  order: -1;
  align-self: center;
  inline-size: 240px;
  block-size: 160px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.hero-copy .lede { max-width: 620px; font-size: 1.0625rem; }
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-block-start: var(--s-2);
}
.hero-actions .btn { min-height: 52px; }
@media (min-width: 1024px) {
  .hero { padding-block: var(--s-9); }
  .hero-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-5);
    align-items: center;
  }
  .hero-copy { grid-column: span 7; gap: 28px; }
  .hero-copy .lede { font-size: 1.1875rem; }
  .hero-mark {
    order: 0;
    grid-column: span 5;
    justify-self: center;
    inline-size: min(420px, 100%);
    block-size: auto;
    aspect-ratio: 3 / 2;
  }
  .hero-actions { flex-direction: row; gap: var(--s-4); }
}

/* 2. No guru band */
.statements {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.statements .card { display: flex; flex-direction: column; gap: var(--s-3); }
@media (min-width: 1024px) {
  .statements { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
  .statements .card { min-height: 190px; }
}
.h2-inline {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.h2-inline::before {
  content: "";
  flex: 0 0 40px;
  height: 2px;
  background: var(--color-rimon);
}
@media (min-width: 1024px) { .h2-inline::before { flex-basis: 48px; } }

/* 3. Practitioner network */
.practitioners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}
.practitioner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-3);
  padding: 20px 12px;
}
.face {
  inline-size: 72px;
  block-size: 72px;
  border-radius: 50%;
  background: var(--bg-band);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.625rem;
  color: var(--color-yam);
}
.practitioner-name { font-weight: 600; font-size: 1rem; }
@media (min-width: 640px) { .practitioners { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .practitioners { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-5); }
  .practitioner { padding: 28px 16px; gap: var(--s-4); }
  .face { inline-size: 88px; block-size: 88px; font-size: 1.875rem; }
  .practitioner-name { font-size: 1.0625rem; }
}

/* 4. Store teaser */
.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}
.product { padding: 0; display: flex; flex-direction: column; }
.product-media {
  block-size: 130px;
  background: var(--line);
}
.product-body {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-name { font-weight: 600; font-size: 1rem; }
.store-all { margin-block-start: var(--s-5); font-weight: 600; font-size: 1rem; text-decoration: none; }
@media (min-width: 1024px) {
  .products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
  .product-media { block-size: 180px; }
  .product-body { padding: 22px 24px; gap: var(--s-2); }
  .product-name { font-size: 1.125rem; }
  .store-all { margin-block-start: 0; }
}

/* 5. Guide teaser */
.guides {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.guides .card { display: flex; flex-direction: column; gap: var(--s-3); }
.guides h3 { font-size: 1.375rem; }
@media (min-width: 1024px) {
  .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
  .guides .card { padding: 40px; gap: 14px; justify-content: center; }
  .guides h3 { font-size: 1.625rem; }
}

/* 6. Ethics band */
.ethics-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.ethics-copy { display: flex; flex-direction: column; gap: 14px; }
.ethics-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
@media (min-width: 1024px) {
  .ethics-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-5);
    align-items: center;
  }
  .ethics-copy { grid-column: span 7; }
  .ethics-actions {
    grid-column: span 5;
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--s-4);
  }
}

/* 7. Footer */
.site-footer {
  background: var(--n-8);
  color: var(--n-3);
  padding-block: 40px 32px;
}
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.footer-col { display: flex; flex-direction: column; gap: var(--s-2); }
.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--n-0);
}
.footer-title { font-weight: 600; font-size: var(--fs-small); color: var(--n-0); }
.site-footer a { color: var(--n-3); text-decoration: none; font-size: var(--fs-small); }
.site-footer a:hover { color: var(--n-0); text-decoration: underline; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.footer-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-muted { color: var(--n-4); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-block-start: 28px;
  padding-block-start: var(--s-4);
  border-block-start: 1px solid var(--n-6);
}
@media (min-width: 1024px) {
  .site-footer { padding-block: 56px; }
  .footer-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--s-5);
  }
  .footer-col { grid-column: span 4; }
  .footer-brand { font-size: 1.375rem; }
  .footer-bottom { margin-block-start: 40px; padding-block-start: 20px; }
}

/* Motion rest states. motion.js sets the animated state only when motion is allowed.
   Without JS, or under prefers-reduced-motion, everything is visible at rest. */
.mark .ring { stroke-dasharray: 88 12; }
[data-reveal] { opacity: 1; transform: none; }
.motion-ready [data-reveal] { opacity: 0; transform: translateY(16px); will-change: transform, opacity; }
.motion-ready [data-reveal].is-in { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover, .card:hover { transform: none; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; will-change: auto; }
}
