/* ═══════════════════════════════════════════════════════════════════════════
   AYU Shared Design System — shared across app, clock, admin
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS VARIABLES ─── */
:root {
  --cream:    #faf9f7;
  --bg:       #faf9f7;   /* alias used by clock */
  --white:    #ffffff;
  --border:   #e4e0d8;
  --text:     #1c1a18;
  --muted:    #888580;
  --orange:   #e05020;
  --blue:     #3da7d6;
  --cyan:     #3da7d6;   /* alias used by clock */
  --moss:     #4a7c59;
  --earth:    #8b6a3e;
  --red:      #c0392b;
  --yellow:   #f39c12;
  --shadow:   0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --header-h: 120px;
  --logo-h:   100px;
  --footer-h: 40px;
}

/* ─── RESET ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; height: 100%; }
body {
  font-family: 'Nunito Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h); /* reserve space above fixed footer */
}

/* ─── HEADER — shared across all AYU modules ─── */
header, .header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  isolation: isolate;
}
.header-logo, header img, .header img {
  height: var(--logo-h);
  width: auto;
  flex-shrink: 0;       /* never compress the logo */
  display: block;       /* removes inline-block gap */
  min-width: 0;
}
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── NAV ICON ─── */
.nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px; font-size: 22px; line-height: 1;
  text-decoration: none; background: none; border: 2px solid transparent;
  cursor: pointer; transition: all .15s; -webkit-tap-highlight-color: transparent;
}
.nav-icon:hover  { background: var(--cream); border-color: var(--border); }
.nav-icon.active { background: var(--orange); border-color: var(--orange); }

/* ─── HAMBURGER NAV ─── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
  margin-left: auto; flex-shrink: 0;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .2s; }
.nav-label { display: none; font-size: 13px; font-weight: 500; }

/* ─── SURFACE NAV ─── */
.surface-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex; align-items: center; gap: 4px;
  height: 40px;
  position: -webkit-sticky; position: sticky;
  top: var(--header-h); z-index: 99;
}
.surface-nav-label   { font-family: 'Arkhip', sans-serif; font-size: 10px; color: var(--muted); letter-spacing: .08em; margin-right: 4px; }
.surface-nav-divider { width: 1px; height: 16px; background: var(--border); margin: 0 8px; }
.surface-nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 6px;
  font-family: 'Arkhip', sans-serif; font-size: 11px; letter-spacing: .04em;
  text-decoration: none; color: var(--muted);
  transition: background .15s, color .15s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.surface-nav-link:hover  { background: var(--cream); color: var(--text); }
.surface-nav-link.active { background: #fff3ef; color: var(--orange); }

/* ─── MOBILE RESPONSIVE ─── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .header-nav {
    display: none; position: fixed; top: var(--header-h); right: 0;
    background: var(--white); border: 1px solid var(--border);
    border-radius: 0 0 0 12px; box-shadow: var(--shadow);
    padding: 8px; flex-direction: column; gap: 4px; z-index: 99; min-width: 140px;
  }
  .header-nav.open { display: flex; }
  .nav-icon { width: 100%; justify-content: flex-start; gap: 10px; padding: 0 12px; border-radius: 8px; }
  .nav-label { display: inline; }
}
@media (max-width: 600px) {
  header, .header { padding: 8px 14px; }
  .surface-nav { padding: 0 10px; }
  .surface-nav-label, .surface-nav-divider { display: none; }
}

/* ─── SHARED FOOTER ─── */
#siteFooter {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  height: var(--footer-h);
  background: var(--white);
  border-top: 2px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
  font-family: 'Nunito Sans', sans-serif;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.footer-accent { color: var(--orange); }
.footer-right  { display: flex; align-items: center; gap: 6px; }
.footer-dim    { color: #bbb; }
.footer-code   { font-size: 10px; color: #888; background: #f4f3f0; padding: 2px 6px; border-radius: 4px; letter-spacing: 0; font-family: monospace; }
#footerVersion { color: #bbb; padding: 1px 5px; }
.footer-btn    { font-size: 10px; padding: 2px 7px; border: 1px solid #ddd; border-radius: 4px; background: var(--white); cursor: pointer; color: #888; }
.footer-btn:hover { border-color: var(--orange); color: var(--orange); }

/* ─── FOOTER — MOBILE HIDE ─── */
@media (max-width: 768px) {
  #siteFooter { display: none !important; }
  body { padding-bottom: 0; }
}

/* ─── SHARED ANIMATIONS ─── */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes blink  { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
