/* ============================================
   Ring Size Circumference — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-focus: #2563eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --transition: .2s ease;
  --max-w: 1100px;
  --header-h: 64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.4rem; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }
.page-hero { background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%); padding: 3rem 0 2.5rem; }

/* ── Header ── */
#site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
#site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1rem; }
.logo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.logo span { color: var(--accent); }
.logo svg { flex-shrink: 0; }

/* Nav */
.nav-links { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 0; }
.nav-links a { font-size: .9rem; font-weight: 500; color: var(--text-muted); padding: .4rem .7rem; border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-light); text-decoration: none; }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; border-radius: var(--radius-sm); }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; margin: 4px 0; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 1rem; box-shadow: var(--shadow); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .25rem; }
.mobile-nav a { display: block; padding: .6rem .9rem; border-radius: var(--radius-sm); font-weight: 500; color: var(--text-muted); }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--primary); background: var(--primary-light); text-decoration: none; }

/* ── Breadcrumb ── */
.breadcrumb { padding: .75rem 0; font-size: .85rem; color: var(--text-muted); display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1.4rem; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .9rem; font-weight: 600; cursor: pointer; transition: all var(--transition); border: 2px solid transparent; line-height: 1; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); text-decoration: none; }
.btn-accent { background: var(--accent); color: #111; border-color: var(--accent); }
.btn-accent:hover { background: #e08c00; text-decoration: none; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.card-hover { transition: transform var(--transition), box-shadow var(--transition); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ── Ring Size Table ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.ring-table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: .9rem; }
.ring-table thead th { background: var(--primary); color: #fff; padding: .75rem 1rem; text-align: center; font-weight: 600; font-size: .82rem; letter-spacing: .03em; white-space: nowrap; }
.ring-table thead th:first-child { text-align: left; }
.ring-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.ring-table tbody tr:hover { background: var(--primary-light); }
.ring-table td { padding: .6rem 1rem; text-align: center; border-bottom: 1px solid var(--border); }
.ring-table td:first-child { text-align: left; font-weight: 600; color: var(--primary); }
.ring-table tfoot td { background: var(--accent-light); font-weight: 600; font-size: .82rem; padding: .6rem 1rem; text-align: center; }

/* ── TOC ── */
.toc-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 2rem 0; }
.toc-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; background: none; border: none; cursor: pointer; font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: var(--text); }
.toc-toggle svg { transition: transform .3s; }
.toc-toggle.open svg { transform: rotate(180deg); }
.toc-content { display: none; padding: 0 1.25rem 1.25rem; }
.toc-content.open { display: block; }
.toc-list { list-style: none; padding: 0; margin: 0; counter-reset: toc-counter; }
.toc-list li { counter-increment: toc-counter; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a { color: var(--primary); font-size: .9rem; }
.toc-list a::before { content: counter(toc-counter) ". "; color: var(--text-muted); font-weight: 600; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; background: none; border: none; cursor: pointer; text-align: left; font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--text); }
.faq-question svg { flex-shrink: 0; transition: transform .3s; color: var(--primary); }
.faq-question.open svg { transform: rotate(45deg); }
.faq-answer { display: none; padding-bottom: 1.1rem; color: var(--text-muted); font-size: .95rem; line-height: 1.75; }
.faq-answer.open { display: block; }

/* ── Calculator / Sizer ── */
.tool-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.input-group { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.25rem; }
.input-group label { font-size: .9rem; font-weight: 600; color: var(--text); }
.input-row { display: flex; gap: .75rem; }
.input-wrap { flex: 1; display: flex; }
.input-wrap input { flex: 1; min-width: 0; padding: .7rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-family: var(--font-body); font-size: 1rem; color: var(--text); background: #fff; outline: none; transition: border-color var(--transition); }
.input-wrap input:focus { border-color: var(--border-focus); }
.input-wrap select, select.unit-sel { padding: .7rem .9rem; border: 2px solid var(--border); border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--bg-soft); font-family: var(--font-body); font-size: .9rem; cursor: pointer; }
select.standalone { padding: .7rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm); background: #fff; font-family: var(--font-body); font-size: .9rem; width: 100%; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; margin-top: 1.25rem; }
.result-box { background: #fff; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: .85rem; text-align: center; }
.result-box.highlight { border-color: var(--primary); background: var(--primary-light); }
.result-box .r-label { font-size: .75rem; font-weight: 600; color: var(--text-muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: .3rem; }
.result-box .r-value { font-size: 1.6rem; font-weight: 700; font-family: var(--font-display); color: var(--primary); }
.result-box .r-sub { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }
.no-result { text-align: center; color: var(--text-muted); padding: 1.5rem; font-style: italic; }

/* ── Ring Sizer Canvas ── */
#sizer-canvas-wrap { display: flex; justify-content: center; align-items: center; background: radial-gradient(circle at 50% 50%, #f0f7ff, #e8f4fd); border-radius: var(--radius); border: 2px dashed var(--border); min-height: 320px; position: relative; overflow: hidden; margin: 1.5rem 0; }
#sizer-canvas { display: block; touch-action: none; }
.sizer-controls { display: flex; flex-direction: column; gap: 1rem; }
.slider-wrap { display: flex; flex-direction: column; gap: .5rem; }
.slider-wrap label { font-weight: 600; font-size: .9rem; display: flex; justify-content: space-between; }
input[type=range] { width: 100%; accent-color: var(--primary); cursor: pointer; height: 6px; }
.unit-tabs { display: flex; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.unit-tab { flex: 1; padding: .5rem; font-size: .85rem; font-weight: 600; border: none; background: none; cursor: pointer; transition: all var(--transition); font-family: var(--font-body); color: var(--text-muted); }
.unit-tab.active { background: var(--primary); color: #fff; }
.sizer-live { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem; }
.sizer-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .65rem; text-align: center; }
.sizer-stat .s-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
.sizer-stat .s-val { font-size: 1.1rem; font-weight: 700; color: var(--primary); font-family: var(--font-display); }
.sizer-sizes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-top: .75rem; }

/* ── Blog ── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.blog-card-img { height: 180px; background: linear-gradient(135deg, #dbeafe, #fef3c7); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
.blog-card-body { padding: 1.25rem; }
.blog-tag { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: .5rem; }
.blog-card-body h3 { font-size: 1.05rem; margin-bottom: .5rem; line-height: 1.4; color: var(--text); }
.blog-card-body p { font-size: .875rem; color: var(--text-muted); margin-bottom: .75rem; }
.blog-meta { font-size: .8rem; color: var(--text-light); display: flex; gap: 1rem; flex-wrap: wrap; }

/* Blog post */
.post-wrap { max-width: 780px; margin: 0 auto; }
.post-wrap h2 { margin-top: 2rem; margin-bottom: .75rem; }
.post-wrap h3 { margin-top: 1.5rem; margin-bottom: .5rem; color: var(--primary); }
.post-wrap ul, .post-wrap ol { margin-bottom: 1rem; }
.post-wrap li { margin-bottom: .35rem; }
.post-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .875rem; color: var(--text-muted); margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.post-meta strong { color: var(--text); }
.callout { background: var(--primary-light); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.callout-accent { background: var(--accent-light); border-left-color: var(--accent); }

/* ── Feature List ── */
.feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.feature-list li { display: flex; align-items: flex-start; gap: .7rem; font-size: .95rem; }
.feature-list li::before { content: '✓'; color: #22c55e; font-weight: 700; flex-shrink: 0; margin-top: .1rem; }

/* ── Steps ── */
.steps { display: flex; flex-direction: column; gap: 1.25rem; counter-reset: step-counter; }
.step { display: flex; gap: 1.1rem; align-items: flex-start; counter-increment: step-counter; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; content: counter(step-counter); }
.step-num::before { content: counter(step-counter); }
.step-body h4 { margin-bottom: .25rem; }
.step-body p { margin: 0; color: var(--text-muted); font-size: .9rem; }

/* ── Hero ── */
.hero { padding: 4rem 0 3rem; background: linear-gradient(135deg, #eff6ff 0%, #fef9ec 100%); }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem; background: var(--accent-light); color: #92400e; font-size: .8rem; font-weight: 700; letter-spacing: .05em; padding: .35rem .8rem; border-radius: 20px; text-transform: uppercase; margin-bottom: 1rem; }
.hero h1 { margin-bottom: 1rem; }
.hero-desc { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.75rem; max-width: 480px; }
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-ring-art { width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #dbeafe, #bfdbfe); display: flex; align-items: center; justify-content: center; box-shadow: 0 20px 60px rgba(37,99,235,.2); position: relative; }
.hero-ring-art::before { content: ''; position: absolute; inset: 40px; border-radius: 50%; background: #fff; }
.hero-ring-art::after { content: ''; position: absolute; inset: 52px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #f8fafc, #eff6ff); border: 4px solid rgba(37,99,235,.15); }
.ring-icon { position: relative; z-index: 2; font-size: 2.5rem; }

/* ── Grid helpers ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.sidebar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }

/* ── Highlight box ── */
.highlight-box { background: var(--primary-light); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; }
.accent-box { background: var(--accent-light); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; }

/* ── Footer ── */
footer { background: #0f172a; color: #cbd5e1; padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand .logo { color: #fff; font-size: 1.2rem; margin-bottom: .75rem; }
.footer-brand .logo span { color: var(--accent); }
.footer-brand p { font-size: .875rem; color: #94a3b8; line-height: 1.7; }
footer h4 { color: #fff; font-size: .9rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 1rem; font-family: var(--font-body); }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
footer ul a { font-size: .875rem; color: #94a3b8; transition: color var(--transition); }
footer ul a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .8rem; color: #64748b; }
.footer-bottom a { color: #94a3b8; }

/* ── Badges / Tags ── */
.badge { display: inline-block; padding: .25rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.badge-blue { background: var(--primary-light); color: var(--primary-dark); }
.badge-gold { background: var(--accent-light); color: #92400e; }
.badge-green { background: #dcfce7; color: #15803d; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Contact ── */
.contact-card { max-width: 560px; margin: 0 auto; text-align: center; padding: 3rem; background: var(--bg-soft); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.contact-icon { font-size: 3rem; margin-bottom: 1rem; }
.email-link { display: inline-flex; align-items: center; gap: .5rem; background: var(--primary); color: #fff; padding: .85rem 1.75rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; margin-top: 1.25rem; transition: background var(--transition); }
.email-link:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }

/* ── Scroll indicator ── */
.scroll-hint { text-align: center; font-size: .78rem; color: var(--text-light); margin-top: .5rem; display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; flex-direction: column; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .sizer-live { grid-template-columns: 1fr 1fr; }
  .sizer-sizes { grid-template-columns: 1fr 1fr; }
  .hero-ctas { flex-direction: column; }
  .scroll-hint { display: block; }
  h1 { font-size: 1.75rem; }
  .tool-card { padding: 1.25rem; }
}
@media (max-width: 400px) {
  .result-grid { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; }
}
