/* Minimal site chrome for the notebook homepage. */
:root {
  --jannati-navy: #073b52;
  --jannati-orange: #ff7a00;
  --h-deep: #062f3f;
  --h-deeper: #041f2a;
  --h-ink: #102a34;
  --h-cream: #f4efe4;
  --h-paper: #fbfaf6;
  --h-orange: #f26a2e;
  --h-gold: #ffc400;
  --h-line: rgba(16, 42, 52, .16);
  --h-shadow: 0 24px 70px rgba(4, 31, 42, .14);
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--h-paper); color: var(--h-ink); }
.horizon-header, .horizon-footer { direction: rtl; }
.horizon-shell { box-sizing: border-box; width: min(1280px, calc(100% - 48px)); margin-inline: auto; }
.horizon-skip { position: fixed; z-index: 10000; top: -80px; inset-inline-start: 24px; padding: 12px 18px; background: var(--h-gold); color: var(--h-deeper); font-weight: 900; text-decoration: none; }
.horizon-skip:focus { top: 0; outline: 3px solid #fff; outline-offset: 2px; }
.jannati-langs { direction: ltr; white-space: nowrap; color: var(--jannati-navy); font-size: 12px; font-weight: 800; }
.jannati-langs a { margin-inline: 7px; color: inherit; text-decoration: none; }
.jannati-langs a.is-current { color: var(--jannati-orange); }

.horizon-header { position: sticky; z-index: 200; top: 0; border-bottom: 1px solid var(--h-line); background: rgba(251,250,246,.97); backdrop-filter: blur(12px); }
.admin-bar .horizon-header { top: 32px; }
.horizon-topbar { background: var(--h-deep); color: #fff; font-size: 12px; }
.horizon-topbar .horizon-shell { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.horizon-topbar p { margin: 0; opacity: .78; }
.horizon-topbar div > div { display: flex; align-items: center; gap: 22px; }
.horizon-topbar a { color: #fff; text-decoration: none; font-weight: 800; }
.horizon-topbar .jannati-langs { color: #fff; }
.horizon-nav { min-height: 88px; display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: clamp(20px, 3vw, 44px); }
.horizon-logo { line-height: 0; }
.horizon-logo img { display: block; width: 205px; height: auto; }
.horizon-desktop-nav { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 2vw, 28px); }
.horizon-desktop-nav a { position: relative; padding: 32px 0 28px; color: var(--h-ink); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.horizon-desktop-nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 23px; height: 2px; background: var(--h-orange); transform: scaleX(0); transform-origin: center; transition: transform .22s ease; }
.horizon-desktop-nav a:hover::after, .horizon-desktop-nav a:focus-visible::after { transform: scaleX(1); }
.horizon-nav-cta { display: inline-flex; align-items: center; gap: 12px; padding: 13px 17px; border: 1px solid var(--h-ink); color: var(--h-ink); text-decoration: none; font-size: 13px; font-weight: 900; }
.horizon-nav-cta span { color: var(--h-orange); font-size: 17px; }
.horizon-nav-cta:hover { background: var(--h-ink); color: #fff; }
.horizon-menu { display: none; position: relative; }
.horizon-menu summary { list-style: none; cursor: pointer; font-weight: 900; }
.horizon-menu summary::-webkit-details-marker { display: none; }

.horizon-footer { padding: 80px 0 24px; background: var(--h-cream); color: var(--h-deep); }
.horizon-footer-main { display: grid; grid-template-columns: 1.5fr repeat(3, .65fr); gap: clamp(32px, 5vw, 74px); }
.horizon-footer-brand img { width: min(300px, 100%); height: auto; }
.horizon-footer-brand h2 { max-width: 440px; margin: 25px 0 10px; font-size: clamp(28px, 3vw, 42px); line-height: 1.2; }
.horizon-footer-brand p { color: #687a80; }
.horizon-footer-main h3 { margin: 5px 0 22px; font-size: 14px; }
.horizon-footer-main > div:not(:first-child) { display: flex; flex-direction: column; align-items: flex-start; }
.horizon-footer-main a { margin-bottom: 13px; color: #425963; font-size: 14px; font-weight: 700; text-decoration: none; }
.horizon-footer-main a:hover { color: var(--h-orange); }
.horizon-footer-main > div > p { color: #687a80; line-height: 1.7; }
.horizon-footer-hours { margin-top: 58px; padding: 18px 0; border-top: 1px solid var(--h-line); border-bottom: 1px solid var(--h-line); color: #596e76; font-size: 13px; font-weight: 800; text-align: center; }
.horizon-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding-top: 24px; color: #74858b; font-size: 12px; }
.horizon-footer-bottom .jannati-langs { color: var(--h-deep); }

html[lang^="fr"] .horizon-header, html[lang^="fr"] .horizon-footer,
html[lang^="en"] .horizon-header, html[lang^="en"] .horizon-footer { direction: ltr; }

@media (max-width: 1100px) {
  .horizon-desktop-nav { display: none; }
  .horizon-nav { grid-template-columns: 1fr auto auto; }
  .horizon-menu { display: block; }
  .horizon-menu summary { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--h-line); }
  .horizon-menu nav { position: absolute; z-index: 20; top: calc(100% + 14px); inset-inline-end: 0; width: min(310px, calc(100vw - 48px)); display: grid; padding: 15px; border: 1px solid var(--h-line); background: var(--h-paper); box-shadow: var(--h-shadow); }
  .horizon-menu nav a { padding: 12px; border-bottom: 1px solid var(--h-line); color: var(--h-ink); text-decoration: none; font-weight: 800; }
}

@media (max-width: 820px) {
  .horizon-shell { width: min(100% - 36px, 1280px); }
  .horizon-header { backdrop-filter: none; }
  .horizon-topbar p, .horizon-nav-cta { display: none; }
  .horizon-topbar .horizon-shell { justify-content: center; }
  .horizon-nav { min-height: 76px; grid-template-columns: 1fr auto; }
  .horizon-logo img { width: 185px; }
  .horizon-footer-main { grid-template-columns: 1.3fr 1fr 1fr; }
  .horizon-footer-main > div:last-child { grid-column: 2 / 4; }
}

@media (max-width: 560px) {
  .admin-bar .horizon-header { top: 46px; }
  .horizon-topbar div > div { gap: 12px; }
  .horizon-topbar .jannati-langs a { margin-inline: 4px; }
  .horizon-footer { padding-top: 58px; }
  .horizon-footer-main { grid-template-columns: 1fr 1fr; }
  .horizon-footer-brand { grid-column: 1 / 3; }
  .horizon-footer-main > div:last-child { grid-column: 1 / 3; }
  .horizon-footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
