/* Rootina Nutri — site-wide layout utilities & polish.
   Colors/type/spacing all come from the design system tokens (styles.css).
   This file only adds responsive layout helpers, image-slot theming,
   and the scroll-reveal motion. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.rn { background: var(--surface-page); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--color-mint-light); color: var(--color-root-green); }

/* ---- containers ---- */
.wrap   { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.wrap-w { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
.wrap-n { max-width: 920px;  margin: 0 auto; padding: 0 40px; }
@media (max-width: 760px) { .wrap, .wrap-w, .wrap-n { padding: 0 22px; } }

/* ---- grids ---- */
.grid   { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1040px) {
  .cols-4, .cols-5, .cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .cols-4, .cols-5, .cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cols-2, .cols-3, .cols-4, .cols-5, .cols-6 { grid-template-columns: 1fr; }
}

/* ---- splits ---- */
.split    { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-60 { grid-template-columns: 1.15fr 1fr; }
.split-40 { grid-template-columns: 1fr 1.15fr; }
@media (max-width: 880px) {
  .split, .split-60, .split-40 { grid-template-columns: 1fr; gap: 36px; }
  .split.rev-mobile > :first-child { order: 2; }
}

/* ---- image slots ---- */
image-slot { display: block; width: 100%; }
image-slot::part(frame)        { background: #e3d3bd; }
image-slot.t-mint::part(frame)    { background: #d6ebdf; }
image-slot.t-sage::part(frame)    { background: #d7e3cd; }
image-slot.t-clay::part(frame)    { background: #e7d2c6; }
image-slot.t-cool::part(frame)    { background: #cfe0db; }
image-slot.t-ceramic::part(frame) { background: #e4e0d6; }
image-slot.t-uplift::part(frame)  { background: #5a7a6c; }
image-slot.t-hero::part(frame)    { background: #173a2c; }
image-slot.t-hero::part(empty)    { color: rgba(255,255,255,0.55); opacity: 0.3; justify-content: flex-end; padding-bottom: 92px; }

/* ---- home slideshow ---- */
.hero-slider { position: relative; width: 100%; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--color-forest); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s ease; }
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-slide image-slot::part(frame) { border-radius: 0; }
.hero-overlay { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(15,33,25,0.82) 0%, rgba(15,33,25,0.5) 42%, rgba(15,33,25,0.2) 100%),
              linear-gradient(to top, rgba(15,33,25,0.72) 0%, rgba(15,33,25,0.1) 45%, rgba(15,33,25,0.28) 100%); }
.hero-content { position: absolute; inset: 0; display: flex; align-items: flex-end; pointer-events: none; }
.hero-content .inner { pointer-events: auto; padding-bottom: clamp(64px, 12vh, 140px); max-width: 760px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700;
  letter-spacing: var(--tracking-looser); text-transform: uppercase; color: var(--color-mint-light); }
.hero-kicker::before { content: ""; width: 34px; height: 2px; background: var(--color-mint-light); display: inline-block; }
.hero-h1 { font-size: clamp(38px, 6.4vw, 84px); line-height: 1.02; font-weight: 800; letter-spacing: -1.5px; color: #fff; margin: 20px 0 0; }
.hero-sub { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.65; color: rgba(255,255,255,0.86); margin: 22px 0 0; max-width: 540px; }
.hero-ctas { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
/* slide entrance of text */
@media (prefers-reduced-motion: no-preference) {
  .hero-slide .hero-kicker, .hero-slide .hero-h1, .hero-slide .hero-sub, .hero-slide .hero-ctas {
    opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.25,.46,.45,.94); }
  .hero-slide.active .hero-kicker { opacity: 1; transform: none; transition-delay: .25s; }
  .hero-slide.active .hero-h1     { opacity: 1; transform: none; transition-delay: .38s; }
  .hero-slide.active .hero-sub    { opacity: 1; transform: none; transition-delay: .52s; }
  .hero-slide.active .hero-ctas   { opacity: 1; transform: none; transition-delay: .66s; }
}
/* dots */
.hero-dots { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; gap: 11px; z-index: 6; }
.hero-dot { width: 32px; height: 4px; border-radius: 4px; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,0.35); transition: background .25s ease; position: relative; overflow: hidden; }
.hero-dot.active { background: rgba(255,255,255,0.9); }
.hero-dot:hover { background: rgba(255,255,255,0.6); }
/* arrows */
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.08); backdrop-filter: blur(4px); color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.hero-arrow:hover { background: rgba(255,255,255,0.2); }
.hero-arrow:active { transform: translateY(-50%) scale(0.92); }
.hero-arrow.prev { left: clamp(14px, 3vw, 38px); }
.hero-arrow.next { right: clamp(14px, 3vw, 38px); }
.hero-scroll { position: absolute; bottom: 30px; right: clamp(20px, 4vw, 48px); z-index: 6; color: rgba(255,255,255,0.7);
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .hero-arrow { display: none; }
  .hero-scroll { display: none; }
  .hero-content .inner { padding-bottom: 96px; }
}

/* ---- nav dropdown ---- */
.rn-drop { position: relative; }
.rn-drop-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px);
  background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-nav);
  padding: 8px; min-width: 230px; opacity: 0; visibility: hidden;
  transition: opacity .18s ease, transform .18s ease; z-index: 40;
}
.rn-drop:hover .rn-drop-menu, .rn-drop:focus-within .rn-drop-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.rn-drop-menu::before {
  content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px;
}
.rn-drop-item { display: block; padding: 11px 14px; border-radius: 8px; cursor: pointer; transition: background .15s ease; }
.rn-drop-item:hover { background: var(--color-mint-light); }

/* ---- mobile nav toggle ---- */
.rn-burger { display: none; }
@media (max-width: 940px) {
  .rn-navlinks { display: none !important; }
  .rn-burger { display: inline-flex !important; }
  .rn-nav-cta { display: none !important; }
}
.rn-mobile-panel { display: none; }
.rn-mobile-panel.open { display: block; }

/* ---- hover lift for plain cards/links ---- */
.lift { transition: transform .2s ease, box-shadow .2s ease; }
.lift:hover { transform: translateY(-3px); }

/* ---- scroll reveal ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.25,.46,.45,.94); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .08s; }
  .reveal.d2 { transition-delay: .16s; }
  .reveal.d3 { transition-delay: .24s; }
  .reveal.d4 { transition-delay: .32s; }
}
@media print { .reveal { opacity: 1 !important; transform: none !important; } }

/* ---- misc ---- */
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: var(--tracking-looser);
  text-transform: uppercase; color: var(--color-green-accent);
}
.rule { width: 56px; height: 3px; border-radius: 3px; background: var(--color-green-accent); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--color-root-green); cursor: pointer; }
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }
