/* =========================================================================
   legal.css - accessibility + legal additions (24.09.2026)
   1) Footer legal row links (index)      - same look as the old plain text
   2) Contact form privacy notice (index) - Amendment 13 notice at collection
   3) Standalone legal pages              - privacy.html / accessibility.html / terms.html
   Loaded after components.css. Everything is scoped so nothing leaks.
   ========================================================================= */

/* ---------- 1) footer legal links ---------- */
#site-footer .footer__legal a {
  color: inherit;
  text-decoration: none;
  border-radius: 3px;
}
#site-footer .footer__legal a:hover { text-decoration: underline; text-underline-offset: 4px; }
#site-footer .footer__legal a:focus-visible { outline: 2px solid var(--fg-caramel); outline-offset: 3px; box-shadow: none; }
@media (max-width: 1023.98px) {
  /* bigger touch target without moving the text (padding cancelled by margin) */
  #site-footer .footer__legal a { display: inline-block; padding-block: 11px; margin-block: -11px; }
}

/* ---------- 2) contact privacy notice ---------- */
#contact .contact__privacy {
  margin: 16px 0 0;
  color: var(--fg-brown);
  font-family: var(--font-heb);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  text-align: right;
}
#contact .contact__privacy a {
  color: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#contact .contact__privacy a:hover { color: var(--fg-caramel); }
#contact .contact__privacy a:focus-visible { outline: 2px solid var(--fg-caramel); outline-offset: 2px; box-shadow: none; }
@media (min-width: 768px) {
  #contact .contact__privacy { font-size: 15px; }
}
@media (min-width: 1280px) {
  /* Figma row stays untouched: the notice hangs under it (below the inline
     field errors), the send status moves one line lower. */
  #contact .contact__form .contact__privacy {
    position: absolute;
    top: calc(100% + 30 * var(--u));
    right: 0;
    left: 0;
    margin: 0;
    font-size: max(14px, calc(18 * var(--u)));
    white-space: nowrap;
  }
  #contact .contact__form .contact__status { top: calc(100% + 62 * var(--u)); }
}

/* ---------- 3) standalone legal pages ---------- */
.legal-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fg-paper);
  color: var(--fg-brown);
  font-family: var(--font-heb);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
}
.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(93, 40, 9, .25);
}
.legal-head__brand { display: inline-flex; padding: 6px; border-radius: 6px; }
.legal-head__logo {
  display: block;
  inline-size: 112px;
  block-size: 56px;
  background: var(--fg-ink);
  -webkit-mask: url(../assets/icons/ruth-logo-transparent.svg) center / contain no-repeat;
          mask: url(../assets/icons/ruth-logo-transparent.svg) center / contain no-repeat;
}
.legal-head__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--fg-brown);
  border-radius: 99px;
  color: var(--fg-brown);
  font-weight: 400;
  font-size: 16px;
  text-decoration: none;
}
.legal-head__back:hover { background: var(--fg-brown); color: #fff; }

.legal-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding: 40px 20px 64px;
}
.legal-main h1 {
  margin: 0 0 8px;
  color: var(--fg-brown);
  font-weight: 700;
  font-size: clamp(36px, 8vw, 64px);
  line-height: 1;
}
.legal-main .legal-meta { margin: 0 0 32px; font-size: 16px; }
.legal-main .legal-draft {
  margin: 0 0 32px;
  padding: 12px 16px;
  border-inline-start: 4px solid var(--fg-caramel);
  background: #f8f1ec;
  font-size: 16px;
}
.legal-main h2 {
  margin: 36px 0 10px;
  color: var(--fg-brown);
  font-weight: 700;
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.2;
}
.legal-main p, .legal-main ul { margin: 0 0 14px; }
.legal-main ul { padding-inline-start: 22px; }
.legal-main li { margin-bottom: 6px; }
.legal-main strong { font-weight: 700; }
.legal-main a {
  color: var(--fg-brown);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-main a:hover { color: var(--fg-caramel); }
.legal-main .placeholder { background: #fff2c8; color: var(--fg-ink); padding: 0 4px; border-radius: 3px; }

.legal-nav { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(93, 40, 9, .25); font-size: 16px; }
.legal-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.legal-nav a { display: inline-block; padding-block: 10px; }
.legal-nav a[aria-current="page"] { font-weight: 700; text-decoration: none; }

.legal-page a:focus-visible { outline: 2px solid var(--fg-caramel); outline-offset: 3px; box-shadow: none; }

/* credits bar - same look as the landing page footer bar */
.legal-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--fg-brown);
  color: #fff;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}
.legal-bar p { margin: 0; }
.legal-bar__credits { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; }
.legal-bar__dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; }

@media (min-width: 768px) {
  .legal-head { padding: 20px 40px; }
  .legal-head__logo { inline-size: 140px; block-size: 70px; }
  .legal-main { padding: 64px 40px 88px; }
  .legal-bar { flex-direction: row; justify-content: space-between; padding-inline: 40px; font-size: 15px; }
}
@media (min-width: 1024px) {
  .legal-page { font-size: 20px; }
  .legal-head { padding: 24px 76px; }
  .legal-bar { min-height: 54px; padding-block: 0; padding-inline: 76px; font-size: 18px; }
}
