/*
Theme Name: IISER Connect
Theme URI: https://iiserconnect.com/
Author: IISER Connect
Author URI: https://iiserconnect.com/
Description: Bespoke lightweight theme for IISER Connect — Apple-style design system (SF Pro stack, frosted nav, cards, dark sections). No jQuery, no page-builder bloat. Built for Gutenberg.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iiser-connect
*/

/* ============================================================
   1. BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-top: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: #1d1d1f;
  background: #fff;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.011em;
}
body.admin-bar { padding-top: 92px; }
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.025em; line-height: 1.12; color: #1d1d1f;
  margin-top: 0;
}
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, optgroup, textarea { font-family: inherit; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal;
}
.skip-link:focus {
  clip: auto; clip-path: none; height: auto; width: auto;
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: #0071e3; color: #fff; padding: 10px 18px; border-radius: 8px;
}

/* Gutenberg width support */
.entry-content > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.page-content > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 1180px; margin-left: auto; margin-right: auto;
}
.alignfull { width: 100%; max-width: 100%; }
.alignwide { max-width: 1400px; }

/* ============================================================
   2. HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(251,251,253,0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.admin-bar .site-header { top: 32px; }
.site-nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 26px;
}
.site-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; color: #1d1d1f; letter-spacing: -0.02em;
  flex: none;
}
.site-brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, #0071e3 0%, #42a5f5 55%, #7b5cff 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; font-weight: 800;
}
.main-navigation { flex: 1; }
.main-navigation ul {
  display: flex; gap: 2px; margin: 0; padding: 0; list-style: none;
  align-items: center;
}
.main-navigation a {
  color: #1d1d1f; font-size: 0.92rem; padding: 8px 11px; border-radius: 10px;
  opacity: 0.82; white-space: nowrap; display: block;
}
.main-navigation a:hover { text-decoration: none; opacity: 1; background: rgba(0,0,0,0.05); }
.main-navigation .current-menu-item > a,
.main-navigation .current-page-ancestor > a { opacity: 1; font-weight: 600; }
.nav-cta { flex: none; }
.nav-cta a {
  display: inline-block; background: #0071e3; color: #fff !important;
  font-size: 0.9rem; font-weight: 500; padding: 8px 18px; border-radius: 980px;
}
.nav-cta a:hover { background: #0077ed; text-decoration: none; }
.burger {
  display: none; background: none; border: 0; font-size: 1.5rem;
  color: #1d1d1f; cursor: pointer; padding: 8px; margin-left: auto; line-height: 1;
}

/* ============================================================
   3. TYPE UTILITIES  (ic-* : also usable per-block in Gutenberg)
   ============================================================ */
.ic-eyebrow {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: #6e6e73; margin-bottom: 14px;
}
.ic-eyebrow-blue { color: #0066cc; }
.ic-lede {
  font-size: 1.22rem; line-height: 1.5; color: #6e6e73; letter-spacing: -0.011em;
}
.ic-lede strong { color: #1d1d1f; }
.ic-center { text-align: center; }
.ic-narrow { max-width: 820px; margin-left: auto; margin-right: auto; }

/* ---------- Sections ---------- */
.ic-section { padding: 88px 0; }
.ic-alt { background: #f5f5f7; }
.ic-dark { background: #000; color: #f5f5f7; }
.ic-dark h1, .ic-dark h2, .ic-dark h3, .ic-dark h4 { color: #fff; }
.ic-dark .ic-lede { color: #a1a1a6; }
.ic-dark .ic-eyebrow { color: #2997ff; }

/* ---------- Buttons (Gutenberg) ---------- */
.wp-block-button__link {
  border-radius: 980px !important; padding: 13px 30px !important;
  font-weight: 500; letter-spacing: -0.01em;
}
.ic-btn-blue .wp-block-button__link { background: #0071e3 !important; color: #fff !important; }
.ic-btn-blue .wp-block-button__link:hover { background: #0077ed !important; }
.ic-btn-dark .wp-block-button__link { background: #1d1d1f !important; color: #fff !important; }
.ic-btn-light .wp-block-button__link { background: #fff !important; color: #1d1d1f !important; }
.ic-btn-ghost .wp-block-button__link { background: rgba(0,0,0,0.06) !important; color: #1d1d1f !important; }
.ic-btn-outline-w .wp-block-button__link {
  background: transparent !important; color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

/* ---------- Cards ---------- */
.ic-card {
  background: #fff; border-radius: 18px; padding: 34px 30px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}
.ic-alt .ic-card { box-shadow: 0 4px 18px rgba(0,0,0,0.06); }
.ic-card h3 { margin-top: 0; font-size: 1.3rem; }
.ic-card p { color: #6e6e73; }
.ic-tint-blue { background: linear-gradient(160deg, #eef5ff, #ffffff 72%); }
.ic-tint-violet { background: linear-gradient(160deg, #f2efff, #ffffff 72%); }
.ic-tint-green { background: linear-gradient(160deg, #edfbf1, #ffffff 72%); }

/* ---------- Stats ---------- */
.ic-stat-num {
  font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}
.ic-stat-label { color: #6e6e73; font-size: 0.95rem; margin-top: 6px; }

/* ---------- Gradient bands ---------- */
.ic-band { border-radius: 28px; padding: 64px 32px; text-align: center; color: #fff; }
.ic-band h2 { color: #fff; }
.ic-band p { color: rgba(255,255,255,0.85); }
.ic-band .ic-eyebrow { color: #a9c7ff; }
.ic-band-blue { background: linear-gradient(135deg, #0a2540 0%, #123a6d 45%, #1b4f9c 100%); }
.ic-band-violet { background: linear-gradient(135deg, #2b1055 0%, #5b21b6 55%, #7c3aed 100%); }
.ic-band-violet .ic-eyebrow { color: #d9c6ff; }

/* ---------- Checklists ---------- */
.ic-check { list-style: none; padding-left: 0; }
.ic-check li {
  position: relative; padding: 9px 0 9px 30px;
  border-bottom: 1px solid rgba(0,0,0,0.07); font-size: 0.98rem;
}
.ic-check li:last-child { border-bottom: 0; }
.ic-check li::before {
  content: "✓"; position: absolute; left: 4px; top: 9px;
  color: #0071e3; font-weight: 700;
}

/* ---------- Tags ---------- */
.ic-tag {
  display: inline-block; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 980px;
  background: rgba(0,0,0,0.06); color: #6e6e73; margin: 0 6px 6px 0;
}
.ic-tag-green { background: #e6f4ea; color: #137333; }
.ic-tag-amber { background: #fef3e2; color: #b06000; }

/* ---------- Price cards ---------- */
.ic-price { border: 2px solid transparent; position: relative; }
.ic-featured { border-color: #0071e3; }
.ic-flag {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  background: #0071e3; color: #fff; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 980px; white-space: nowrap;
}
.ic-draft {
  display: inline-block; font-size: 0.75rem; font-weight: 700; color: #b06000;
  background: #fef3e2; padding: 4px 12px; border-radius: 980px; margin-bottom: 12px;
}
.ic-outcome {
  background: #f5f5f7; border-radius: 12px; padding: 14px 16px;
  font-size: 0.93rem; margin: 6px 0 20px;
}
.ic-outcome strong {
  display: block; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: #6e6e73; margin-bottom: 4px;
}

/* ---------- Steps ---------- */
.ic-step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: #1d1d1f; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem; margin-bottom: 14px;
}
.ic-dark .ic-step-num { background: #2997ff; }

/* ---------- FAQ ---------- */
.ic-faq details { border-bottom: 1px solid rgba(0,0,0,0.12); padding: 18px 4px; }
.ic-faq summary { font-weight: 600; font-size: 1.04rem; cursor: pointer; list-style: none; }
.ic-faq summary::-webkit-details-marker { display: none; }
.ic-faq summary::after { content: " +"; color: #6e6e73; font-weight: 400; }
.ic-faq details[open] summary::after { content: " –"; }
.ic-faq details p { color: #6e6e73; margin-top: 10px; }

/* ============================================================
   4. FOOTER
   ============================================================ */
.site-footer {
  background: #f5f5f7; padding: 56px 0 0;
  font-size: 0.88rem; color: #6e6e73;
}
.footer-grid {
  max-width: 1180px; margin: 0 auto; padding: 0 24px 40px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
}
.site-footer h4, .widget-title {
  font-size: 0.88rem; color: #1d1d1f; font-weight: 600; margin: 0 0 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #6e6e73; }
.site-footer a:hover { color: #1d1d1f; }
.footer-brand p { margin: 12px 0 0; max-width: 300px; }
.legal-bar { border-top: 1px solid rgba(0,0,0,0.1); }
.legal-inner {
  max-width: 1180px; margin: 0 auto; padding: 22px 24px;
  display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
  font-size: 0.78rem;
}
.legal-inner nav ul { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }

/* ============================================================
   5. POSTS / ARCHIVE
   ============================================================ */
.post-hero {
  max-width: 820px; margin: 0 auto; padding: 84px 24px 36px; text-align: center;
}
.post-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.entry-meta { color: #6e6e73; font-size: 0.92rem; margin-top: 14px; }
.entry-meta a { color: #6e6e73; }
.single .entry-content, .page .narrow-content .entry-content {
  max-width: 760px;
}
.entry-content { padding-bottom: 72px; }
.entry-content p, .entry-content li { font-size: 1.06rem; }
.post-card {
  background: #fff; border-radius: 18px; padding: 30px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08); margin-bottom: 22px;
}
.post-card h2 { font-size: 1.5rem; margin: 0 0 8px; }
.post-card h2 a { color: #1d1d1f; }
.post-card p { color: #6e6e73; }
.archive-wrap { max-width: 820px; margin: 0 auto; padding: 84px 24px 72px; }
.archive-wrap > h1 { text-align: center; margin-bottom: 40px; }
.pagination { text-align: center; padding: 20px 0 72px; }
.pagination .page-numbers {
  display: inline-block; padding: 8px 14px; border-radius: 10px; color: #1d1d1f;
}
.pagination .current { background: #1d1d1f; color: #fff; }

/* ---------- Comments ---------- */
.comments-area { max-width: 760px; margin: 0 auto; padding: 0 24px 72px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { border-bottom: 1px solid rgba(0,0,0,0.08); padding: 20px 0; }
.comment-meta { font-size: 0.85rem; color: #6e6e73; margin-bottom: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(0,0,0,0.18);
  border-radius: 12px; font-size: 1rem; margin-bottom: 12px;
}
.comment-form .submit {
  background: #0071e3; color: #fff; border: 0; border-radius: 980px;
  padding: 12px 28px; font-size: 1rem; cursor: pointer;
}

/* ---------- Search / 404 ---------- */
.search-wrap, .error-wrap {
  max-width: 720px; margin: 0 auto; padding: 110px 24px; text-align: center;
}
.search-form { display: flex; gap: 10px; max-width: 480px; margin: 24px auto 0; }
.search-form input[type="search"] {
  flex: 1; padding: 12px 16px; border: 1px solid rgba(0,0,0,0.18);
  border-radius: 980px; font-size: 1rem;
}
.search-form input[type="submit"] {
  background: #0071e3; color: #fff; border: 0; border-radius: 980px;
  padding: 12px 24px; cursor: pointer; font-size: 1rem;
}

/* ---------- Widgets ---------- */
.widget { margin-bottom: 28px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 8px; }

/* ---------- WPForms ---------- */
.wpforms-container input[type="text"], .wpforms-container input[type="email"],
.wpforms-container textarea, .wpforms-container select {
  border-radius: 12px !important; padding: 13px 16px !important;
  border: 1px solid rgba(0,0,0,0.18) !important; font-size: 1rem !important;
}
.wpforms-container button[type="submit"] {
  background: #0071e3 !important; color: #fff !important; border: 0 !important;
  border-radius: 980px !important; padding: 13px 34px !important;
  font-size: 1rem !important; font-weight: 500 !important;
}

/* ============================================================
   6. RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .main-navigation { display: none; }
  .burger { display: block; }
  .nav-cta { display: none; }
  .site-header.nav-open .main-navigation {
    display: block; position: absolute; top: 60px; left: 0; right: 0;
    background: rgba(251,251,253,0.98);
    border-bottom: 1px solid rgba(0,0,0,0.08); padding: 10px 24px 18px;
  }
  .site-header.nav-open .main-navigation ul { flex-direction: column; align-items: stretch; }
  .site-header.nav-open .main-navigation a { padding: 12px 8px; font-size: 1rem; }
  .site-header.nav-open .nav-cta { display: block; position: absolute; top: 70px; right: 70px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 782px) {
  body.admin-bar { padding-top: 106px; }
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 640px) {
  .ic-section { padding: 60px 0; }
  .ic-band { padding: 44px 22px; }
  .ic-stat-num { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-hero { padding-top: 64px; }
}
