/* ============================================================
   LDM MOBILE — comprehensive responsive fixes
   Targets: 375px (iPhone SE) through 768px (tablet)
   ============================================================ */

/* ── Global spacing tightening on small screens ── */
@media (max-width: 768px) {
  .container,
  .doc-container {
    padding-inline: clamp(1.25rem, 5vw, 2rem);
  }

  /* ── NAV ── */
  .nav {
    padding: 1rem 1.25rem;
  }
  .nav.scrolled {
    padding: .75rem 1.25rem;
  }
  .nav-wordmark {
    font-size: .55rem;
    letter-spacing: .2em;
  }
  .nav-crest-img {
    width: 26px;
  }
  .nav-links,
  .nav-btn {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }

  /* ── HERO (homepage) ── */
  .hero {
    padding-top: 7rem;
    padding-bottom: 4rem;
    padding-inline: 1.25rem;
    min-height: 100dvh;
  }
  .hero-crest {
    width: clamp(90px, 22vw, 140px);
    margin-bottom: .25rem;
  }
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
    letter-spacing: .03em;
  }
  .hero-motto {
    font-size: clamp(.9rem, 3.5vw, 1.1rem);
  }
  .hero-body {
    font-size: .9rem;
    line-height: 1.7;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 300px;
    gap: .75rem;
  }
  .hero-cta .btn-primary,
  .hero-cta .btn-ghost {
    width: 100%;
    text-align: center;
    padding: 1rem;
  }
  .corner {
    width: 24px;
    height: 24px;
  }
  .corner.tl { top: 1.25rem; left: 1.25rem; }
  .corner.tr { top: 1.25rem; right: 1.25rem; }
  .corner.bl { bottom: 1.25rem; left: 1.25rem; }
  .corner.br { bottom: 1.25rem; right: 1.25rem; }
  .star-mark { display: none; }
  .hero-scroll { display: none; }
  .desktop-only { display: none; }

  /* ── TRUST BAR ── */
  .trust-bar {
    padding: 1rem;
  }
  .trust-inner {
    gap: .75rem;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .trust-divider { display: none; }
  .trust-item {
    flex-direction: row;
    gap: .35rem;
    align-items: baseline;
  }
  .trust-num { font-size: .55rem; }
  .trust-label { font-size: .55rem; }

  /* ── ABOUT SPLIT (homepage) ── */
  .about {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .about-visual {
    height: 55vw;
    min-height: 220px;
  }
  .about-img-overlay {
    background: linear-gradient(to bottom, transparent 40%, var(--color-bg) 100%);
  }
  .about-content::before { display: none; }
  .about-content {
    padding: 2rem 1.25rem 3rem;
  }
  .about-heading,
  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  /* ── CRITERIA GRID ── */
  .criteria-grid {
    grid-template-columns: 1fr;
  }
  .criteria-card {
    padding: 1.75rem 1.25rem;
  }
  .criteria-statement {
    max-width: none;
    padding-inline: .25rem;
  }

  /* ── INSIDE SECTION ── */
  .inside-grid {
    grid-template-columns: 1fr;
  }
  .inside-item {
    padding: 1.5rem 1.25rem;
  }

  /* ── MANIFESTO ── */
  .manifesto-inner {
    padding-inline: 1rem;
  }
  .manifesto-text {
    font-size: clamp(.95rem, 3.5vw, 1.1rem);
  }

  /* ── PILLARS ── */
  .pillars {
    grid-template-columns: 1fr;
  }
  .pillar {
    padding: 1.75rem 1.25rem;
  }

  /* ── CODE SECTION (homepage) ── */
  .code-list {
    grid-template-columns: 1fr;
  }
  .code-item {
    padding: 1.25rem 1.5rem;
  }

  /* ── APPLY FORM ── */
  .apply-section {
    padding-block: 3rem;
  }
  .apply-form {
    gap: 1.25rem;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .apply-standard {
    padding: 1.25rem;
    margin-bottom: 2rem;
  }

  /* ── FOOTER ── */
  .footer-inner {
    gap: 1rem;
  }
  .footer-links {
    gap: 1rem;
    justify-content: center;
  }
  .footer-links a {
    font-size: .45rem;
    letter-spacing: .15em;
  }
  .footer-contact {
    font-size: .75rem;
    text-align: center;
    line-height: 2;
  }

  /* ── SEAL SHOWCASE ── */
  .seal-showcase img {
    max-width: 100%;
  }

  /* ── CARDS SHOWCASE ── */
  .cards-showcase img {
    max-width: 100%;
  }

  /* ── PHILOSOPHY INTERSTITIAL ── */
  .phil-interstitial {
    padding-block: 3rem;
  }
  .phil-inter-quote {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
  }

  /* ── SECTION HEADER PADDING ── */
  .section-header {
    margin-bottom: 2rem;
  }
}

/* ── EVENTS PAGE ── */
@media (max-width: 768px) {
  .events-hero {
    min-height: 70vw;
    padding-bottom: 2.5rem;
    padding-inline: 1.25rem;
  }
  .events-hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .events-hero-sub { font-size: .85rem; }

  .events-filter {
    gap: .35rem;
    margin-bottom: 1.75rem;
  }
  .filter-tab {
    padding: .4rem .85rem;
    font-size: .48rem;
  }

  /* Featured event — stack vertically */
  .event-featured {
    grid-template-columns: 1fr;
  }
  .event-featured-visual {
    min-height: 200px;
  }
  .event-featured-visual::after {
    background: linear-gradient(to bottom, transparent 40%, var(--color-surface) 100%);
  }
  .event-featured-content {
    padding: 1.75rem 1.25rem;
    gap: 1rem;
  }
  .event-featured-title { font-size: 1.2rem; }
  .event-date-day { font-size: 2.2rem; }

  .events-grid {
    grid-template-columns: 1fr;
  }
  .event-card {
    padding: 1.5rem 1.25rem;
  }

  .past-event-row {
    grid-template-columns: 60px 1fr;
    padding: 1rem 1.25rem;
    gap: 1rem;
  }
  .past-event-type { display: none; }

  .events-apply-bar { padding-block: 3rem; }
  .events-apply-heading { font-size: 1.3rem; }

  .events-section-label { margin-bottom: 1.25rem; }
  .events-quote-strip { padding-block: 3rem; }
  .events-quote-text { font-size: clamp(.95rem, 3.5vw, 1.2rem); }
}

/* ── ABOUT PAGE ── */
@media (max-width: 768px) {
  .about-hero {
    min-height: 65vh;
    padding-bottom: 2.5rem;
    padding-inline: 1.25rem;
  }
  .about-hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .about-hero-sub { font-size: .9rem; }

  .origin-section { padding-block: 3rem; }
  .origin-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .origin-heading { font-size: clamp(1.3rem, 5vw, 1.8rem); }
  .origin-body { font-size: .95rem; }

  .contrast-section { padding-block: 3rem; }
  .contrast-grid {
    grid-template-columns: 1fr;
  }
  .contrast-col { padding: 1.75rem 1.25rem; }
  .contrast-col-heading { font-size: .65rem; }
  .contrast-list li { font-size: .9rem; }

  .seal-split {
    grid-template-columns: 1fr;
  }
  .seal-image-side {
    min-height: 240px;
  }
  .seal-image-side img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .seal-image-side::after {
    background: linear-gradient(to bottom, transparent 50%, var(--color-bg) 100%);
  }
  .seal-content-side {
    padding: 2rem 1.25rem;
  }

  .values-section { padding-block: 3rem; }
  .values-section::before { margin-bottom: 3rem; }
  .values-grid {
    grid-template-columns: 1fr;
  }
  .value-cell { padding: 1.5rem 1.25rem; }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-stat { padding: 1.25rem .75rem; }
  .about-stat-value { font-size: 1rem; }
  .about-stat-label { font-size: .4rem; }

  .about-final { padding: 3rem 1.25rem; }
  .about-final-text { font-size: clamp(.95rem, 3.5vw, 1.2rem); }
}

/* ── PHILOSOPHY PAGE ── */
@media (max-width: 768px) {
  .doctrine-header,
  .phil-header {
    padding-top: 7rem;
    padding-bottom: 3rem;
    min-height: 55vh;
  }
  .doc-title { font-size: clamp(1.6rem, 7vw, 2.5rem); }

  .phil-split {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .phil-split-label {
    padding-top: 0;
    margin-bottom: .25rem;
  }
  .phil-principle { padding: 2rem 0; }
  .phil-principle-heading { font-size: clamp(1.3rem, 5.5vw, 1.8rem); }
  .doc-oath { padding: 2rem 1rem; }
  .oath-final { font-size: clamp(1rem, 4vw, 1.2rem) !important; }
  .phil-closing { padding: 3rem 1.25rem; }
  .phil-closing-text { font-size: clamp(.9rem, 3.5vw, 1.05rem); }
  .phil-closing-finale { font-size: clamp(1rem, 4.5vw, 1.4rem); }
  .doctrine-cta-bar { padding: 2.5rem 1.25rem; }
}

/* ── DOCTRINE PAGE ── */
@media (max-width: 768px) {
  .doc-section-heading {
    font-size: clamp(.85rem, 3.5vw, 1rem);
    flex-wrap: wrap;
    gap: .35rem;
  }
  .doc-roman { font-size: 1.2em; }
  .doc-text p { font-size: .95rem; }
  .doc-symbols {
    grid-template-columns: 1fr;
  }
  .doc-code-list { /* single column already */ }
  .doc-code-item { padding: 1rem 1.25rem; gap: 1rem; }
  .doc-pillar { padding: 1.5rem 1rem 1.5rem 1.5rem; }
  .doc-laws { gap: 1.5rem; }
  .doc-law { gap: 1.25rem; }
  .doc-law-num { font-size: 2rem; min-width: 2rem; }
  .doc-charge { padding: 1.75rem 1.25rem; gap: .65rem; }
  .doc-charge p { font-size: .95rem; }
  .doc-numbered li,
  .doc-bullet li { font-size: .9rem; }
}

/* ── MOBILE DRAWER ── */
@media (max-width: 768px) {
  .drawer-link {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }
  .drawer-nav { gap: 1.5rem; }
}

/* ── BUTTONS ── */
@media (max-width: 768px) {
  .btn-primary,
  .btn-ghost {
    font-size: .58rem;
    padding: .85rem 1.75rem;
  }
  .btn-large {
    padding: 1rem 2rem;
    font-size: .6rem;
    width: 100%;
  }
  .nav-btn { display: none; }
}

/* ── 375px fine-tuning ── */
@media (max-width: 400px) {
  .hero-title { font-size: clamp(1.6rem, 9vw, 2rem); letter-spacing: .01em; }
  .hero-crest { width: 80px; }
  .events-hero-title { font-size: 1.7rem; }
  .about-hero-title { font-size: 1.8rem; }
  .doc-title { font-size: 1.6rem; }
  .footer-links { gap: .75rem; }
  .trust-inner { justify-content: center; }
  .pillar-name { font-size: .85rem; }
  .code-item { padding: 1rem; }
}
