/* ─────────────────────────────────────────────────────────────
   iAm Store Bali — shared styling for the legal pages
   (privacy.html · terms.html · warranty.html)
   Tokens mirror index.html so the pages read as part of the site.
   ───────────────────────────────────────────────────────────── */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #FAFAF9;
  --bg2:      #F5F4F2;
  --bg-dark2: #0C0A09;
  --fg:       #0C0A09;
  --secondary:#57534E;
  --muted:    #A8A29E;
  --gold:     #A16207;
  --gold-lt:  #D97706;
  --border:   #E7E5E3;
  --border-dk:rgba(255,255,255,0.1);
  --serif:    'Playfair Display', Georgia, serif;
  --sans:     'DM Sans', system-ui, sans-serif;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 150px; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--fg); color: var(--bg);
  padding: 0.5rem 1rem; border-radius: 4px;
  font-size: 0.8rem; z-index: 9999;
}
.skip-link:focus { top: 1rem; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px;
}

/* ─── READING PROGRESS ─── */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60; }
.progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-lt), var(--gold));
  transition: width 0.1s linear;
}

/* ─── NAV ─── */
.lg-nav {
  position: sticky; top: 0; z-index: 50;
  height: 68px; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(250,250,249,0.92);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 0.5px solid var(--border);
}
.lg-logo { transition: opacity 0.2s; }
.lg-logo:hover { opacity: 0.8; }
.lg-logo img { height: 48px; width: auto; object-fit: contain; display: block; }
.lg-back {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.78rem; font-weight: 700; color: var(--fg);
  text-decoration: none; padding: 0.5rem 1.1rem;
  border: 0.5px solid var(--border); border-radius: 980px;
  background: #fff; min-height: 40px;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s;
}
.lg-back:hover { transform: translateY(-1px); border-color: var(--gold); }

/* ─── HERO ─── */
.lg-hero {
  background: var(--bg-dark2); color: #fff;
  padding: 4.5rem 2rem 3rem;
  position: relative; overflow: hidden;
}
.lg-hero::before {
  content: ''; position: absolute; pointer-events: none;
  width: 700px; height: 700px; border-radius: 50%;
  background: rgba(161,98,7,0.08); filter: blur(100px);
  top: -320px; left: 50%; transform: translateX(-50%);
}
.lg-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.crumb {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-bottom: 1rem;
}
.crumb a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s; }
.crumb a:hover { color: #fff; }
.crumb .current { color: rgba(255,255,255,0.7); }
.lg-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800; line-height: 1.06; letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.lg-hero h1 em { font-style: italic; color: var(--gold-lt); }
.lg-updated {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.76rem; color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
  border: 0.5px solid rgba(255,255,255,0.12);
  padding: 0.35rem 0.85rem; border-radius: 980px;
}

/* ─── DOC SWITCHER TABS ─── */
.lg-tabs {
  background: var(--bg-dark2); padding: 0 2rem;
  position: sticky; top: 68px; z-index: 40;
  border-bottom: 0.5px solid var(--border-dk);
}
.lg-tabs-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; gap: 0.4rem; overflow-x: auto;
}
.lg-tab {
  flex-shrink: 0; padding: 0.9rem 1.25rem;
  font-size: 0.82rem; font-weight: 600;
  color: rgba(255,255,255,0.45); text-decoration: none;
  position: relative; white-space: nowrap;
  transition: color 0.25s;
}
.lg-tab:hover { color: #fff; }
.lg-tab.active { color: #fff; }
.lg-tab.active::after {
  content: ''; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 0;
  height: 2px; background: var(--gold-lt); border-radius: 2px 2px 0 0;
}

/* ─── LAYOUT: sticky TOC + content ─── */
.lg-layout {
  max-width: 1100px; margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  display: grid; grid-template-columns: 230px 1fr;
  gap: 4rem; align-items: start;
}
.lg-toc { position: sticky; top: 150px; }
.lg-toc-title {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}
.lg-toc ol {
  list-style: none; display: flex; flex-direction: column; gap: 0.15rem;
  border-left: 1.5px solid var(--border);
}
.lg-toc a {
  display: block; padding: 0.4rem 0 0.4rem 1rem;
  font-size: 0.8rem; color: var(--secondary); text-decoration: none;
  border-left: 1.5px solid transparent; margin-left: -1.5px;
  transition: color 0.25s, border-color 0.25s;
}
.lg-toc a:hover { color: var(--fg); }
.lg-toc a.active { color: var(--gold); font-weight: 600; border-left-color: var(--gold); }

/* ─── BODY ─── */
.lg-lead {
  font-size: 1.02rem; line-height: 1.8; color: var(--secondary);
  margin-bottom: 2.5rem; padding-bottom: 2rem;
  border-bottom: 0.5px solid var(--border);
}
.lg-body section { margin-bottom: 3rem; scroll-margin-top: 150px; }
.lg-body h2 {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 700;
  margin-bottom: 0.9rem; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 0.6rem;
}
.lg-body h2 .num {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 700;
  color: var(--gold); letter-spacing: 0.04em; flex-shrink: 0;
}
.lg-body h3 { font-size: 0.95rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.lg-body p {
  font-size: 0.94rem; line-height: 1.85;
  color: var(--secondary); margin-bottom: 1rem;
}
.lg-body ul, .lg-body ol.steps {
  margin: 0 0 1rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.lg-body li {
  font-size: 0.94rem; line-height: 1.8;
  color: var(--secondary); padding-left: 0.35rem;
}
.lg-body li::marker { color: var(--gold); }
.lg-body b { color: var(--fg); font-weight: 600; }
.lg-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.lg-body a:hover { color: var(--gold-lt); }

/* callout for the important bits */
.lg-note {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.lg-note p:last-child { margin-bottom: 0; }

/* covered / not covered cards (warranty) */
.lg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.lg-card {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 14px; padding: 1.5rem;
}
.lg-card h3 { margin-top: 0; display: flex; align-items: center; gap: 0.5rem; }
.lg-card ul { margin-left: 1rem; }
.lg-card .yes { color: #15803D; }
.lg-card .no  { color: #B91C1C; }

/* ─── HELP CARD ─── */
.lg-help {
  background: var(--bg-dark2); color: #fff;
  border-radius: 20px; padding: 2.5rem; text-align: center;
  margin-top: 4rem; position: relative; overflow: hidden;
}
.lg-help::before {
  content: ''; position: absolute; pointer-events: none;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(161,98,7,0.1); filter: blur(80px);
  top: -200px; left: 50%; transform: translateX(-50%);
}
.lg-help-inner { position: relative; z-index: 1; }
.lg-help h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.lg-help h3 em { font-style: italic; color: var(--gold-lt); }
.lg-help p { font-size: 0.86rem; color: rgba(255,255,255,0.5); margin-bottom: 1.5rem; }
.lg-help-btns { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.lg-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: 980px;
  font-size: 0.84rem; font-weight: 700; text-decoration: none; min-height: 44px;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s, background 0.3s;
}
.lg-btn-wa { background: #25D366; color: #fff; }
.lg-btn-wa:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37,211,102,0.35); }
.lg-btn-ghost {
  background: rgba(255,255,255,0.08); color: #fff;
  border: 0.5px solid rgba(255,255,255,0.18);
}
.lg-btn-ghost:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }

/* ─── DISCLAIMER ─── */
.lg-disclaimer {
  margin-top: 2.5rem; padding: 1.75rem;
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 14px;
  font-size: 0.8rem; line-height: 1.75; color: var(--secondary);
}
.lg-disclaimer b { color: var(--fg); font-weight: 600; }

/* ─── BACK TO TOP ─── */
.to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 55;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-dark2); color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--gold); }

/* ─── FOOTER ─── */
.lg-foot {
  background: var(--bg-dark2); color: #fff;
  padding: 3rem 2rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom, 0px));
  text-align: center; border-top: 0.5px solid var(--border-dk);
}
.lg-foot p { font-size: 0.76rem; color: rgba(255,255,255,0.35); margin-bottom: 1rem; }
.lg-foot-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }
.lg-foot a {
  font-size: 0.76rem; color: rgba(255,255,255,0.45);
  text-decoration: none; transition: color 0.25s;
}
.lg-foot a:hover { color: #fff; }

/* ─── PRINT / PDF ─── */
/* Customers do print the warranty policy — strip the furniture. */
@media print {
  .lg-nav, .lg-tabs, .lg-toc, .to-top, .progress, .lg-help, .lg-foot, .skip-link { display: none !important; }
  .lg-hero { background: none; color: #000; padding: 0 0 1rem; }
  .lg-hero::before { display: none; }
  .lg-hero h1, .lg-hero h1 em { color: #000; }
  .lg-updated { color: #555; background: none; border: 0; padding: 0; }
  .crumb { display: none; }
  .lg-layout { display: block; padding: 0; max-width: 100%; }
  .lg-body section { page-break-inside: avoid; }
  .lg-note, .lg-card { border: 1px solid #ccc; }
  body { background: #fff; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .lg-layout { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.25rem 4rem; }
  .lg-toc {
    position: static; background: var(--bg2);
    border: 0.5px solid var(--border); border-radius: 14px;
    padding: 1rem 1.25rem;
  }
  .lg-toc ol { border-left: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
  .lg-toc.open ol { max-height: 700px; }
  .lg-toc-title {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; margin: 0;
  }
  .lg-toc.open .lg-toc-title { margin-bottom: 1rem; }
  .lg-toc-title svg { transition: transform 0.3s; }
  .lg-toc.open .lg-toc-title svg { transform: rotate(180deg); }
  .lg-toc a { padding-left: 0; border-left: 0; }
  .lg-toc a.active { border-left: 0; }
  .lg-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lg-nav { height: 56px; padding: 0 1rem; }
  .lg-logo img { height: 34px; }
  .lg-tabs { top: 56px; padding: 0 1rem; }
  .lg-hero { padding: 2.5rem 1.25rem 2rem; }
  .lg-help { padding: 1.75rem; border-radius: 16px; }
  .lg-help-btns { flex-direction: column; }
  .lg-btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
