/* ============================================================
   Rewamil — Landing Page (page-specific layout)
   Loads ON TOP of the design-system foundations:
     1. colors_and_type.css   — :root tokens + element defaults
     2. components.css        — btn / card / friction / why /
                                 data-point / training / faq /
                                 pricing-tile / badge
   This file declares NO tokens of its own; every value is a
   var(--*) from the design system.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -moz-osx-font-smoothing: grayscale;
}

body { margin: 0; overflow-x: hidden; }
body.is-locked { overflow: hidden; }

img, svg { display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* ---------- Layout ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 760px;
  margin: 0 0 var(--head-gap);
}
.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-heading { font-size: var(--t-section); }
.section-intro {
  margin-top: 18px;
  font-size: var(--t-intro);
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Hero load animation ---------- */
.reveal-load {
  opacity: 0;
  transform: translateY(20px);
  animation: riseIn .9s var(--ease-out) forwards;
  animation-delay: calc(var(--load, 0) * 110ms + 120ms);
}
@keyframes riseIn { to { opacity: 1; transform: none; } }

/* ---------- Inline links ---------- */
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--w-semi);
  color: var(--red);
  text-decoration: none;
}
.inline-link span { transition: transform .25s var(--ease); }
.inline-link:hover span { transform: translateX(4px); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 248, 246, .8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 10px 30px -24px rgba(20, 20, 25, .5);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: var(--w-bold);
}
.brand-word { font-size: 1.32rem; letter-spacing: -.02em; color: var(--ink); }
.brand-logo { flex: none; transition: transform .5s var(--ease); }
.brand:hover .brand-logo { transform: rotate(90deg); }

.nav-menu { display: flex; align-items: center; gap: 10px; }

.navlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .98rem;
  font-weight: var(--w-semi);
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  padding: 5px 18px;
  transition: transform .2s var(--ease), background-color .22s var(--ease),
              border-color .22s var(--ease), color .22s var(--ease), box-shadow .25s var(--ease);
}
.navlink-text {
  position: relative;
  color: var(--ink-soft);
  padding: 10px 6px;
}
.navlink-text::after {
  content: "";
  position: absolute;
  left: 6px; right: 6px;
  bottom: 4px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.navlink-text:hover { color: var(--ink); }
.navlink-text:hover::after { transform: scaleX(1); }

.navlink-signup {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px -12px rgba(222, 33, 39, .7);
}
.navlink-signup:hover { background: var(--red-deep); transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(222, 33, 39, .8); }

.navlink-login {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--bg-card);
}
.navlink-login:hover { border-color: var(--ink); transform: translateY(-2px); }

.nav-menu-extra { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  z-index: 120;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .28s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 20, 25, .42);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.nav-backdrop:not([hidden]) { animation: fadeIn .3s var(--ease) forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.nav-backdrop.is-open { opacity: 1; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 50px 0 104px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .42;
  will-change: transform;
}
.hero-blob-1 {
  width: 460px; height: 460px;
  top: -140px; left: 8%;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  animation: float1 16s var(--ease) infinite alternate;
}
.hero-blob-2 {
  width: 420px; height: 420px;
  top: -90px; right: 6%;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  animation: float2 19s var(--ease) infinite alternate;
}
.hero-blob-3 {
  width: 360px; height: 360px;
  bottom: -160px; left: 38%;
  background: radial-gradient(circle, var(--orange), transparent 70%);
  opacity: .3;
  animation: float3 22s var(--ease) infinite alternate;
}
@keyframes float1 { to { transform: translate(40px, 50px) scale(1.1); } }
@keyframes float2 { to { transform: translate(-50px, 40px) scale(1.08); } }
@keyframes float3 { to { transform: translate(30px, -40px) scale(1.12); } }

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-eyebrow { margin-bottom: 30px; background: rgba(255, 255, 255, .7); }
.hero-logo {
  width: 90px; height: 90px;
  margin: 28px auto 0;
  filter: drop-shadow(0 14px 26px rgba(20, 20, 25, .14));
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.hero-heading {
  margin: 0 auto;
  font-size: var(--t-hero);
  font-weight: var(--w-bold);
  max-width: 15ch;
  line-height: 1.06;
}
.hero-accent {
  background: linear-gradient(100deg, var(--red), var(--orange) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subhead {
  margin: 24px auto 0;
  max-width: 58ch;
  font-size: var(--t-intro);
  color: var(--ink-soft);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 38px auto 0;
}
.hero-microcopy {
  margin-top: 22px;
  font-size: .98rem;
  color: var(--ink-mute);
  font-weight: var(--w-med);
}

/* ============================================================
   THE FRICTION  (uses .card .friction-item + .num from DS)
   ============================================================ */
.friction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.friction-item {
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.friction-item:hover { transform: translateY(-4px); }
.friction-item h3 { margin-top: 6px; font-size: 1.24rem; }
.friction-item p { margin-top: 10px; color: var(--ink-soft); font-size: .98rem; }

.friction-item-lead {
  background: linear-gradient(155deg, #fff, #fff6f1);
  border-color: rgba(222, 33, 39, .25);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.friction-lead-mark { margin-bottom: 6px; }
.friction-item-lead h3 { margin-top: 6px; }
.friction-item-lead .inline-link { margin-top: 16px; }

/* ============================================================
   WHY REWAMIL  (uses .why-item diamond marker from DS)
   ============================================================ */
.why-list { display: grid; gap: 4px; }
.why-item { padding: 24px 16px; }
.why-item::before { margin-top: 13px; width: 13px; height: 13px; }
.why-body h3 { font-size: 1.42rem; }
.why-body p { margin-top: 10px; color: var(--ink-soft); max-width: 70ch; }

/* ============================================================
   WHAT'S INSIDE  (uses .card .feature-card + accent from DS)
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}
.feature-card { padding: 40px; }
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(95,196,229,.10), transparent 55%);
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.feature-card:hover::before { opacity: 1; }
.feature-card h3 { position: relative; font-size: 1.32rem; }
.feature-card p { position: relative; margin-top: 12px; }

/* ============================================================
   YOUR DATA  (uses .data-point[data-accent] from DS)
   ============================================================ */
.data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.data-point { padding: 4px 0 4px 20px; transition: transform .3s var(--ease); }
.data-point:hover { transform: translateY(-3px); }
.data-point h3 { font-size: 1.28rem; }
.data-point p { margin-top: 10px; color: var(--ink-soft); }
.data-note { margin-top: 38px; font-size: var(--t-fine); color: var(--ink-mute); max-width: 70ch; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 42px 40px;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.pricing-lines { display: grid; }
.pricing-lines li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.pricing-label { font-weight: var(--w-semi); font-size: 1.05rem; color: var(--ink); }
.pricing-detail { color: var(--ink-soft); }
.pricing-detail strong { color: var(--ink); font-weight: var(--w-semi); }
.pricing-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.pricing-tile { font-weight: var(--w-semi); font-size: .92rem; color: var(--ink); }
.pricing-fine { margin-top: 22px; font-size: var(--t-fine); color: var(--ink-mute); }
.pricing-cta { margin-top: 26px; width: 100%; justify-content: center; }

/* ============================================================
   TRAINING  (uses .training-stage + .stage-bar + .stage-tag from DS)
   ============================================================ */
.training-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.training-stage {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px 28px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.training-stage:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.training-stage .stage-bar { left: 30px; right: 30px; height: 3px; }
.stage-tag { color: var(--red); }
.training-stage h3 { margin-top: 8px; font-size: 1.42rem; }
.training-stage-sub { margin-top: 8px; color: var(--ink-soft); font-size: .98rem; }
.training-points { margin-top: 18px; display: grid; gap: 9px; }
.training-points li { position: relative; padding-left: 22px; font-size: .95rem; color: var(--ink-soft); }
.training-points li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  transform: rotate(45deg);
}
.training-cta { margin-top: 38px; text-align: center; }

/* ============================================================
   ABOUT THE MAKER
   ============================================================ */
.maker {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
}
.maker-photo {
  position: relative;
  aspect-ratio: 1 / 1.1;
  border-radius: 18px;
  background: linear-gradient(150deg, #ffffff, var(--bg-alt));
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.maker-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 30% 20%, rgba(95, 196, 229, .14), transparent 60%);
  pointer-events: none;
}
.maker-photo-mark { opacity: .9; animation: bob 7s ease-in-out infinite; }
.maker-photo-label { font-size: var(--t-fine); color: var(--ink-mute); letter-spacing: .02em; }
.maker-note p { margin-top: 16px; color: var(--ink-soft); font-size: 1.04rem; }
.maker-note p:first-child { margin-top: 0; }
.maker-sign {
  margin-top: 22px !important;
  font-style: italic;
  font-size: 1.14rem;
  color: var(--ink) !important;
}
.maker-sign span {
  display: inline-block;
  font-style: normal;
  font-size: .9rem;
  color: var(--ink-mute);
}

/* ============================================================
   FAQ  (uses .faq-item / .faq-q / .faq-icon / .faq-a from DS)
   ============================================================ */
.faq { border-top: 1px solid var(--rule); }
.faq-q { font-size: 1.18rem; line-height: 1.3; transition: color .22s var(--ease); }
.faq-q:hover { color: var(--red); }
.faq-a p { max-width: 68ch; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: #f4f4f1;
  padding: 64px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(244, 244, 241, .14);
}
.footer-brand .brand-word { color: #fff; }
.footer-tagline {
  margin-top: 18px;
  max-width: 36ch;
  color: rgba(244, 244, 241, .68);
  font-size: 1rem;
}
.footer-contact {
  display: inline-block;
  margin-top: 16px;
  color: var(--cyan);
  text-decoration: none;
  font-weight: var(--w-semi);
  transition: color .22s var(--ease);
}
.footer-contact:hover { color: #fff; }

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.footer-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-col-title {
  font-size: var(--t-eyebrow);
  font-weight: var(--w-bold);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244, 244, 241, .5);
  margin-bottom: 16px;
}
.footer-link {
  position: relative;
  color: rgba(244, 244, 241, .82);
  text-decoration: none;
  font-size: .98rem;
  padding: 7px 0;
  transition: color .22s var(--ease), transform .22s var(--ease);
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 3px;
  width: 100%; height: 1.5px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.footer-link:hover { color: #fff; transform: translateX(4px); }
.footer-link:hover::after { transform: scaleX(1); }

.footer-bottom { padding-top: 28px; }
.footer-copy { font-size: var(--t-fine); color: rgba(244, 244, 241, .55); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .friction-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .training-path { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; gap: 22px; }
  .maker { grid-template-columns: 1fr; gap: 28px; }
  .maker-photo { max-width: 280px; aspect-ratio: 1 / 1; margin: 0 auto; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 24px 40px -26px rgba(20, 20, 25, .6);
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s var(--ease);
  }
  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .navlink {
    justify-content: flex-start;
    text-align: left;
    border-radius: 0;
    border: none;
    padding: 15px 28px;
    font-size: 1.05rem;
    color: var(--ink);
    box-shadow: none;
  }
  .navlink-text { color: var(--ink); padding: 15px 28px; }
  .navlink-text::after { display: none; }
  .navlink:not(.navlink-signup):active,
  .navlink:not(.navlink-signup):hover { background: var(--bg-alt); transform: none; }

  .navlink-signup {
    background: var(--red);
    color: #fff;
    border-radius: 0;
    box-shadow: none;
    font-weight: var(--w-bold);
  }
  .navlink-signup:hover { background: var(--red-deep); transform: none; }

  .navlink-login { background: transparent; border: none; }

  .nav-menu-extra { display: flex; flex-direction: column; }
  .nav-divider { height: 1px; margin: 10px 28px; background: var(--rule); }
  .navlink-sub {
    font-size: .95rem;
    font-weight: var(--w-med);
    color: var(--ink-soft);
    padding: 12px 28px;
  }
  .navlink-sub:hover { background: var(--bg-alt); color: var(--ink); }

  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  .section { padding: var(--section-y-sm) 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding: 64px 0 72px; }
  .hero-cta { width: 100%; max-width: 360px; }
  .hero-cta .btn { width: 100%; }
  .friction-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-card { padding: 30px 22px; }
  .pricing-lines li { grid-template-columns: 1fr; gap: 4px; }
  .pricing-tiles { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .reveal-load { opacity: 1; transform: none; }
}



.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);

}

.image-viewer.is-open {
    opacity: 1;
    pointer-events: all;
}

.image-viewer__img {
    width: unset !important;
    height: unset !important;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-viewer.is-open .image-viewer__img {
    transform: scale(1);
}

.image-viewer__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 1;
}

.image-viewer__close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}