/* =========================================================
   RIVORNE — RESPONSIVE RULES
   Desktop base is in style.css; breakpoints are consolidated.
========================================================= */

/* Compact laptops and tablets */
@media (max-width: 1100px) {
  .about-story-card { gap: 27px; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px 36px; }
  .footer-brand { max-width: 380px; }
}

/* Mobile navigation and tablet layouts */
@media (max-width: 1000px) {
  :root {
    --navbar-height: 60px;
    --anchor-gap: 20px;
  }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle span { display: block; width: 25px; height: 2px; background: var(--white); border-radius: 3px; transition: transform .25s ease, opacity .25s ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    max-height: calc(100dvh - var(--header-top) - var(--navbar-height) - 18px);
    overflow-y: auto;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    background: rgba(3, 27, 43, .98);
    box-shadow: 0 17px 38px rgba(0, 0, 0, .31);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: flex; min-height: 45px; padding: 11px 16px; }
  .features-grid { gap: 18px; }
  .feature-card { border-radius: 19px; }
  .expert-showcase { grid-template-columns: 1fr; }
  .expert-visual { min-height: 300px; }
  .expert-avatar-placeholder { width: 165px; height: 165px; }
  .expert-avatar-placeholder svg { width: 91px; height: 91px; }
  .expert-content { padding: 42px; }
}

/* Tablet content proportions */
@media (max-width: 850px) {
  .about-story-card, .about-story-reverse { grid-template-columns: 1fr; gap: 20px; }
  .about-story-reverse img { grid-row: 1; }
  .about-story-card img { height: 330px; }
  .about-story-text { padding: 9px 12px 17px; }
  .audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audience-item { border-top: 1px solid transparent; }
  .audience-item + .audience-item { border-left: 0; border-radius: 14px; }
  .audience-item:nth-child(even) { border-left: 1px solid rgba(102, 224, 234, .15); border-radius: 0; }
  .audience-item:nth-child(n+3) { border-top-color: rgba(102, 224, 234, .15); }
  .safety-card { grid-template-columns: 1fr; gap: 20px; }
  .safety-heading { min-height: 0; padding: 0 0 16px; border-right: 0; border-bottom: 1px solid rgba(7, 54, 75, .16); }
}

/* One feature per row; comfortable reading width */
@media (max-width: 700px) {
  .hero {
    min-block-size: auto;
    padding-block-end: 50px;
  }
  .features-grid { grid-template-columns: 1fr; gap: 21px; }
  .feature-card-name { bottom: 24px; }
  .survey-showcase { border-radius: 23px; }
  .survey-content h2 { font-size: clamp(30px, 7vw, 41px); }
  .footer-main { grid-template-columns: 1fr; gap: 37px; }
  .footer-brand { max-width: none; }
  .footer-column h3 { margin: 0 0 17px; }
  .footer-social-links { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
  .footer-social-links .footer-social-link { min-width: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 15px; margin-top: 43px; }
}

/* Smaller phones */
@media (max-width: 480px) {
  .hero { background-position: center, center, 52% center; }
  .hero-actions { width: min(100%, 300px); gap: 8px; }
  .hero-btn { flex: 1 0 100%; }
  .about-story-card { padding: 13px; gap: 12px; border-radius: 19px; }
  .about-story-card img { height: 225px; border-radius: 13px; }
  .about-story-text { padding: 6px 7px 16px; }
  .vision-card { min-height: 295px; margin: 37px 0; padding: 40px 22px; border-radius: 20px; }
  .audience-card { padding: 28px 11px 20px; border-radius: 20px; }
  .audience-intro { margin-bottom: 16px; }
  .audience-item { padding: 16px 8px; }
  .audience-icon { width: 52px; height: 52px; margin-bottom: 12px; border-radius: 14px; }
  .audience-icon svg { width: 27px; height: 27px; }
  .safety-card { padding: 25px 21px; }
  .safety-heading svg { width: 40px; height: 40px; flex-basis: 40px; }
  .expert-visual { min-height: 260px; padding: 27px; }
  .expert-avatar-placeholder { width: 142px; height: 142px; }
  .expert-avatar-placeholder svg { width: 80px; height: 80px; }
  .expert-content { padding: 31px 24px; }
}

/* User motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
