/* ================================================================
   MOD: PORTAL — split-panel landing hub (index.html only)
   Requires: core.css tokens. No JS dependency beyond core.js's
   theme toggle (the portal page has no nav/hamburger, so core.js's
   nav-toggle and active-section blocks are no-ops here — harmless).

   NEW MOD — doesn't exist in the reference set or in the n0idols
   build; unique to Inkstrim's two-service structure. This is the
   full-viewport entry hub: a centered logo/wordmark over two large
   clickable panels (Roofing / Remodeling), plus a slim footer bar.

   Reuses core.css's .footer-bottom / .footer-legal / .footer-social
   as-is for the legal links + social icons row (same class names,
   same look) — only the portal-specific wrapper (.portal-footer,
   .footer-top) is defined here, since the full dark .site-footer
   card from core.css doesn't apply to this page's layout.

   HTML needed: <main class="portal" role="main">
     <button class="theme-toggle" id="themeToggle" ...>...</button>

     <div class="portal-main">
       <header class="portal-logo">
         <img class="logo-img" src="..." alt="..." />
         <!-- or a text wordmark: <div class="company-name">...</div> -->
         <div class="tagline">...</div>
         <div class="logo-divider"></div>
       </header>

       <nav class="portal-panels" aria-label="Choose a service">
         <a class="panel panel--a" href="roofing.html">
           <div class="panel-bg" role="img" aria-label="..."></div>
           <div class="panel-overlay"></div>
           <div class="panel-content">
             <span class="panel-icon">🏠</span>
             <div class="panel-title">...</div>
             <div class="panel-sub">...</div>
             <span class="panel-cta">Explore →</span>
           </div>
         </a>
         <!-- second panel: class="panel panel--b" -->
       </nav>
     </div>

     <footer class="portal-footer">
       <div class="footer-top">
         <span>© [year] ...</span>
         <span><a href="tel:...">...</a> &nbsp;·&nbsp; <a href="mailto:...">...</a></span>
       </div>
       <div class="footer-bottom">
         <ul class="footer-legal">...</ul>
         <div class="footer-social">...</div>
       </div>
     </footer>
   </main>

   GOTCHA: each panel's background photo is set via an inline
   background-image on .panel-bg in index.html (two different
   photos, panel--a vs panel--b) rather than in this file — same
   "photo is the one per-instance thing" pattern as .hero-bg in
   core.css.
================================================================ */

.portal {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg-deep);
}

/* Wraps the logo + panels and grows to fill all space the footer
   doesn't need, then centers its own content inside that space —
   this replaces guessed padding-bottom values with real flex math
   at any viewport height. */
.portal-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

/* Ambient background texture */
.portal::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(var(--accent1-rgb), 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Logo / wordmark ---- */
.portal-logo {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-bottom: 48px;
  animation: fadeDown 0.8s ease both;
}
.portal-logo .company-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-color);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,0.1), 0 2px 8px rgba(0,0,0,0.6), 0 0 60px rgba(var(--accent1-rgb), 0.2);
}
.portal-logo .company-name .highlight { color: var(--accent1); }
.portal-logo .logo-img {
  width: min(600px, 70vw);
  height: auto;
  display: block;
  margin: 60px auto 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6)) drop-shadow(0 0 40px rgba(var(--accent1-rgb),0.2));
}
.portal-logo .tagline {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent1);
  margin-top: 10px;
}
.logo-divider {
  width: 60px; height: 2px;
  background: var(--accent1);
  margin: 14px auto 0;
  box-shadow: var(--shadow-glow);
}

/* ---- Split panels — the two entry doors ---- */
.portal-panels {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 20px;
  width: min(860px, 90vw);
  animation: fadeUp 0.9s 0.2s ease both;
}

.panel {
  flex: 1;
  position: relative;
  height: clamp(260px, 38vh, 360px);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
  outline: none;
  border: 1px solid var(--border-2);
}
.panel:hover,
.panel:focus-visible {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover), var(--shadow-glow);
}

/* Background photo — set inline per panel in index.html, same
   "photo is the one per-instance thing" pattern as .hero-bg. */
.panel-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform var(--transition), filter var(--transition);
  filter: brightness(0.45) saturate(0.8);
}
.panel:hover .panel-bg,
.panel:focus-visible .panel-bg { transform: scale(1.06); filter: brightness(0.35) saturate(0.6); }

.panel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(var(--accent1-rgb), 0) 0%, rgba(var(--accent1-rgb), 0.18) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.panel:hover .panel-overlay,
.panel:focus-visible .panel-overlay { opacity: 1; }

.panel-content { position: relative; z-index: 2; text-align: center; padding: 24px; }

.panel-icon {
  font-size: 2.8rem; margin-bottom: 16px; display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
  transition: transform var(--transition);
}
.panel:hover .panel-icon { transform: scale(1.1); }

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  margin-bottom: 10px;
}
.panel-sub {
  font-size: 0.82rem; font-weight: 400; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); margin-bottom: 20px;
}
.panel-cta {
  display: inline-block; padding: 10px 28px;
  border: 1.5px solid var(--accent1); border-radius: var(--radius-sm);
  color: var(--accent1); font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.panel:hover .panel-cta,
.panel:focus-visible .panel-cta { background: var(--accent1); color: var(--paper); box-shadow: 0 0 20px var(--accent1-glow); }

/* ---- Theme toggle — fixed top-right, since the portal has no
     navbar to embed it in like the sub-pages do. ---- */
.portal .theme-toggle { position: fixed; top: 20px; right: 20px; z-index: 30; }

/* ---- Footer bar ---- */
.portal-footer {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  padding: 18px 32px;
  flex-direction: column;
  gap: 12px;
  font-size: 0.75rem;
  color: rgba(var(--fg-rgb), 0.4);
  letter-spacing: 0.05em;
  z-index: 10;
}
.footer-top { width: 100%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-top a { color: var(--accent1); text-decoration: none; opacity: 0.7; transition: opacity 0.2s; }
.footer-top a:hover { opacity: 1; }
.footer-bottom {border-top: 1px solid rgba(var(--fg-rgb), 0.08)}

/* core.css's .footer-bottom/.footer-legal/.footer-social already
   fit this layout as-is (same class names, same look) — reused
   directly rather than redefined here. */

@keyframes fadeDown { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(24px); }  to { opacity: 1; transform: translateY(0); } }

@media (max-width: 700px) {
  .portal-footer { gap: 10px; text-align: center; }
  .footer-top { flex-direction: column; gap: 6px; }
  .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
      }

      .footer-legal { justify-content: center; }
      .footer-social { justify-content: center; }
    }

@media (max-width: 600px) {
  .portal-main { padding: 24px 0; }
  .portal-panels { flex-direction: column; gap: 12px; width: 90vw; }
  .panel { height: 160px; }
  .panel-icon { font-size: 2rem; margin-bottom: 10px; }
  .portal-logo { margin-bottom: 20px; }
}