/* ============================================
   PRIME 22 — Shared Stylesheet
   Used by: index.html, projects/*.html
   Contains: design tokens, reset, header/nav,
   footer, lightbox. Page-specific layout
   (hero, carousel, tabs, forms) stays inline
   in each page's own <style> block.
   ============================================ */

:root {
  --navy: #003260;
  --navy-mid: #0a4d80;
  --navy-light: #1c6aa8;
  --gold: #c9c1b0;
  --gold-bright: #e4decf;
  --white: #ffffff;
  --offwhite: #faf8f3;
  --ink: #003260;
  --text-soft: #5c6478;
  --header-h: 76px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  background: var(--offwhite);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: clip;
  max-width: 100vw;
}
.brandfont { font-family: 'Lalezar', 'Vazirmatn', sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ---------- HEADER / NAV ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(250,248,243,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 8px 32px rgba(0,29,56,0.08);
  transition: transform 0.3s ease;
  will-change: transform;
}
header.header-hidden {
  transform: translateY(-100%);
}
#projects, #about, #contact {
  scroll-margin-top: var(--header-h);
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-size: 24px; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.navlinks { display: flex; gap: 28px; font-size: 15px; font-weight: 500; color: var(--text-soft); }
.navlinks a:hover { color: var(--gold); }
.nav-cta {
  background: var(--navy); color: var(--white); padding: 10px 22px;
  border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--gold);
}
.nav-cta:hover { background: var(--gold); color: var(--navy); }
.back-link {
  font-size: 14px; font-weight: 600; color: var(--navy);
  border: 1px solid var(--gold); padding: 9px 18px; border-radius: 999px;
}
.back-link:hover { background: var(--gold); }
@media (max-width: 780px) { .navlinks { display: none; } }

/* ---------- MOBILE MENU (hamburger) ---------- */
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(201,193,176,0.35);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--navy);
}
@media (max-width: 780px) {
  .menu-toggle { display: flex; width: 34px; height: 34px; font-size: 17px; border-radius: 8px; }
  .nav-cta { padding: 7px 14px; font-size: 12.5px; }
}
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,29,56,0.55);
  z-index: 80;
  display: none;
}
.mobile-menu.show { display: block; }
.mobile-menu-panel {
  position: absolute;
  top: 0; right: 0;
  width: 78%;
  max-width: 300px;
  height: 100%;
  background: var(--offwhite);
  padding: 24px;
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  animation: slideInMenu 0.25s ease;
}
@keyframes slideInMenu {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.mobile-menu-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(201,193,176,0.4);
  background: #fff; font-size: 18px; cursor: pointer;
  margin-bottom: 24px;
}
.mobile-menu-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-links a {
  padding: 14px 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid rgba(201,193,176,0.15);
}
.mobile-menu-links a:hover { color: var(--gold); }

/* ---------- FOOTER ---------- */
footer {
  background: #001d38; color: #93a7b5; text-align: center;
  padding: 24px; font-size: 13px;
}

/* ---------- LIGHTBOX (shared by all galleries) ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,29,56,0.92);
  display: none; align-items: center; justify-content: center; z-index: 999; padding: 30px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 16px; }
.lightbox-close {
  position: absolute; top: 24px; left: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 20px; cursor: pointer;
}

/* ---------- Multi-organization installment tables (for projects with several entry paths) ---------- */
.org-tabs { display:flex; gap:8px; flex-wrap:wrap; margin: 22px 0 16px; }
.org-tab-btn { padding:10px 18px; border-radius:12px; background:#fff; border:1.5px solid rgba(201,193,176,0.3); font-size:13.5px; font-weight:700; color:var(--text-soft); cursor:pointer; transition:all .2s; }
.org-tab-btn.active { background: var(--navy); color:#fff; border-color: var(--navy); }
.org-panel { display:none; }
.org-panel.active { display:block; animation: pTabIn .4s ease; }
.share-tabs { display:flex; gap:6px; flex-wrap:wrap; margin: 4px 0 14px; }
.share-tab-btn { padding:7px 14px; border-radius:10px; background: var(--offwhite); border:1.5px solid rgba(201,193,176,0.3); font-size:12.5px; font-weight:700; color:var(--text-soft); cursor:pointer; transition:all .2s; }
.share-tab-btn.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.share-panel { display:none; }
.share-panel.active { display:block; animation: pTabIn .35s ease; }
.install-table { overflow-x:auto; margin-top:6px; }
.install-table table { width:100%; border-collapse:collapse; min-width:460px; background:#fff; border-radius:16px; overflow:hidden; }
.install-table th, .install-table td { padding:12px 14px; border-bottom:1px solid rgba(201,193,176,0.15); text-align:right; font-size:13.5px; }
.install-table th { background:var(--navy); color:var(--gold-bright); font-family:'Lalezar',sans-serif; font-weight:400; font-size:14.5px; }
.install-table td { color:var(--text-soft); }
.install-table tr:last-child td { font-weight:800; color:var(--navy); }

/* ---------- COMMON CONTENT PATTERNS (project pages) ---------- */
.section-title { font-size:20px; font-weight:800; color:var(--navy); margin: 36px 0 14px; }
.p-text { color: var(--text-soft); font-size:15px; margin-bottom:14px; }
.note-box { font-size:13px; color:#9aa9aa; background:#efece4; border-radius:14px; padding:14px 18px; margin-top:10px; }
.emoji-row { font-size: 26px; text-align:center; margin-bottom: 10px; }
.punch-line { text-align:center; font-size:17px; font-weight:700; color:var(--navy); margin: 22px 0; line-height:2; }
.punch-line b { color: var(--gold); }

/* ---------- PROJECT PAGE TABS (shared template — price / about / builder / rating) ---------- */
.p-tabs { display:flex; gap:8px; margin: 24px 0 28px; flex-wrap:wrap; border-radius:18px; }
.p-tabs.bottom-tabs { margin: 36px 0 4px; }
.p-tab-btn {
  flex:1; min-width:130px; text-align:center; padding:13px 8px; border-radius:14px; font-weight:800; font-size:13.5px;
  background:#fff; border:1.5px solid rgba(201,193,176,0.3); color:var(--text-soft); cursor:pointer; transition: all .2s;
}
.p-tab-btn.active { background: var(--navy); color:#fff; border-color: var(--navy); }
.p-tab-panel { display:none; }
.p-tab-panel.active { display:block; animation: pTabIn .45s cubic-bezier(.2,.8,.3,1); }
@keyframes pTabIn { from{opacity:0; transform:translateY(14px) scale(.99);} to{opacity:1; transform:translateY(0) scale(1);} }
@media (max-width:640px){ .p-tabs { gap:6px; } .p-tab-btn { min-width: calc(50% - 6px); font-size:12.5px; padding:12px 6px; } }

/* attention pulse — stays on for as long as a tab isn't selected, so the person always notices there's more to see */
.p-tabs.attn-pulse .p-tab-btn:not(.active) { animation: pTabPulse 1.6s ease infinite; }
.p-tabs.attn-pulse .p-tab-btn:nth-child(2):not(.active) { animation-delay: .18s; }
.p-tabs.attn-pulse .p-tab-btn:nth-child(3):not(.active) { animation-delay: .36s; }
.p-tabs.attn-pulse .p-tab-btn:nth-child(4):not(.active) { animation-delay: .54s; }
@keyframes pTabPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,127,201,0); border-color: rgba(201,193,176,0.3); }
  50% { box-shadow: 0 0 0 5px rgba(74,127,201,0.30); border-color: #4a7fc9; }
}

/* ---------- RATING TAB (Prime22's own score for the project) ---------- */
.rating-summary { text-align:center; background: linear-gradient(135deg, var(--navy), #001d38); border-radius:22px; padding:30px 24px; margin-bottom:24px; color:#fff; }
.rating-summary .score { font-family:'Lalezar',sans-serif; font-size:52px; color:var(--gold-bright); line-height:1; }
.rating-summary .score small { font-size:20px; color:#9db3c4; }
.rating-summary .label { margin-top:8px; font-size:14px; color:#c9d2e6; }
.rating-criteria { display:flex; flex-direction:column; gap:16px; }
.rating-row { background:#fff; border:1px solid rgba(201,193,176,0.2); border-radius:16px; padding:18px; }
.rating-row-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; font-size:14px; font-weight:700; color:var(--navy); }
.rating-row-head .val { font-family:'Lalezar',sans-serif; font-size:17px; color:var(--gold); }
.rating-bar { height:8px; border-radius:999px; background:rgba(201,193,176,0.2); overflow:hidden; }
.rating-bar > div { height:100%; background: linear-gradient(90deg, var(--gold), var(--navy)); border-radius:999px; }
.rating-row p { margin-top:8px; font-size:13px; color:var(--text-soft); }

/* ---------- ARTICLE / GUIDE PAGES (shared template — presale, buying-methods, and future guides) ---------- */
.bg-watermark { position: fixed; inset: 0; display:flex; align-items:center; justify-content:center; z-index:0; pointer-events:none; opacity: 0.045; }
.bg-watermark svg, .bg-watermark img { width: 620px; max-width: 150vw; }

.c-hero { background: linear-gradient(180deg, var(--navy) 0%, #001d38 100%); color: #fff; padding: calc(50px + var(--header-h)) 24px 46px; text-align: center; position: relative; overflow: hidden; }
.c-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(201,193,176,0.5) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.12;
  pointer-events: none;
}
.c-hero > * { position: relative; z-index: 1; }
.c-hero .tag { display:inline-block; font-size:13px; color: var(--gold-bright); border:1px solid rgba(201,193,176,0.4); padding:6px 16px; border-radius:999px; margin-bottom:16px; }
.c-hero h1 { font-family:'Lalezar', sans-serif; font-weight:400; font-size: clamp(28px,4.5vw,40px); margin-bottom: 10px; }
.c-hero p { color:#9db3c4; font-size:15px; max-width: 560px; margin: 0 auto; line-height: 1.9; }
.c-wave { display:block; width:100%; height:46px; }
.c-wave path { fill: var(--offwhite); }

.wrap { max-width: 780px; margin: 0 auto; padding: 10px 24px 46px; position: relative; z-index: 1; }

.block { background:#fff; border:1px solid rgba(201,193,176,0.2); border-radius:22px; padding:28px; margin-bottom:22px; box-shadow: 0 20px 50px rgba(0,50,96,0.08); }
.block h2 { font-size:19px; color:var(--navy); margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.block p { font-size:14.5px; color: var(--text-soft); line-height: 2; margin-bottom: 12px; }
.block p:last-child { margin-bottom: 0; }
.block ul { margin: 0 0 12px; padding-right: 20px; }
.block ul:last-child { margin-bottom: 0; }
.block li { font-size:14.5px; color: var(--text-soft); line-height: 2.1; }
.block li b { color: var(--ink); }

.checklist { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.checklist li { display:flex; align-items:flex-start; gap:10px; font-size:14.5px; color:var(--ink); line-height:1.9; background: var(--offwhite); border-radius:12px; padding:12px 14px; }
.checklist li::before { content:'✓'; flex-shrink:0; width:22px; height:22px; border-radius:50%; background:var(--navy); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; }

.warn-box { background: #fbf3ea; border-right: 3px solid #d99a4e; border-radius: 14px; padding: 14px 16px; font-size: 14px; color: #7a4a1a; line-height: 1.9; }

.method-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap:12px; }
.method-card { background: var(--offwhite); border-radius:14px; padding:16px; text-align:center; border: 1px solid rgba(201,193,176,0.3); }
.method-card .ic { font-size:24px; margin-bottom:8px; }
.method-card b { display:block; font-size:14px; color:var(--ink); margin-bottom:4px; }
.method-card span { font-size:12.5px; color:var(--text-soft); line-height:1.7; display:block; }

.steps { list-style:none; padding:0; margin:0; counter-reset: step; display:flex; flex-direction:column; gap:14px; }
.steps li { counter-increment: step; position:relative; padding-right:38px; font-size:14.5px; color:var(--text-soft); line-height:2; }
.steps li::before {
  content: counter(step);
  position:absolute; right:0; top:0;
  width:26px; height:26px; border-radius:50%;
  background: var(--navy); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700;
}
.steps li b { color: var(--ink); display:block; margin-bottom:2px; }

.site-note { text-align:center; margin-top:6px; }
.site-note p { color: var(--text-soft); font-size:14px; margin-bottom:12px; }
.site-note .btn-row { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.site-note a { display:inline-block; background: var(--navy); color:#fff; padding:12px 26px; border-radius:14px; font-weight:700; font-size:14px; border: 1px solid var(--gold); }
.site-note a.alt { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
