/* =====================================================================
   common.css — shared structure for all "Project Showcase" pages.

   HOW TO USE ON A NEW PROJECT PAGE:
   1. <link rel="stylesheet" href="common.css"> in <head>, BEFORE your
      page's own <style> block (so your overrides win the cascade).
   2. In your page's <style> block, override the :root variables below
      to set that project's palette.
   3. Also in your page's <style> block, add CSS only for that
      project's unique signature element (e.g. a route strip, a radar
      ping, a stepper, a hierarchy tree) — anything NOT listed here.
   4. Re-use the existing class names for everything else: .nav, .pass,
      .pass-stub, .section-head, .stacks/.tags, .stamped, .about,
      .gallery/.phone, footer, .reveal — don't redefine these per page.
   ===================================================================== */

:root{
  /* ---- palette: override every one of these per project ---- */
  --bg: #F7F5FB;
  --paper: #FFFFFF;
  --ink: #241F38;
  --muted: #857FA0;
  --line: #E4DFF3;
  --accent: #6F5FE0;         /* primary brand color for this project   */
  --accent-deep: #4C3EC4;    /* darker shade, used for stub gradient    */
  --accent2: #E8A24A;        /* secondary accent, used for tag dots     */
  --stamp: #4F9B72;          /* "completed" badge color, usually shared */
  --text-body: #3A3355;      /* paragraph copy color in about/stamp rows*/

  --shadow: 0 20px 60px -25px rgba(76,62,196,0.35);
  --glow1: rgba(111,95,224,0.08);   /* body background radial glow, top-left  */
  --glow2: rgba(232,162,74,0.10);   /* body background radial glow, mid-right */
  --nav-bg: rgba(247,245,251,0.78);

  --phone-dark: #1C1830;
  --screen-g1: #EFEAFB;
  --screen-g2: #F9F6FF;
  --card-line-bg: #EDE7FB;

  --badge-g1: #FBF6EC;
  --badge-g2: #F7ECD8;
  --badge-border: #EBD9AF;
  --badge-text: #5A4E33;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 8%, var(--glow1), transparent 40%),
    radial-gradient(circle at 85% 60%, var(--glow2), transparent 45%);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection{ background: var(--accent); color: #fff; }
h1,h2,h3{ font-family:'Space Grotesk', sans-serif; margin:0; }
.mono{ font-family:'IBM Plex Mono', monospace; }
a{ color: inherit; }

/* ===== Reveal on scroll ===== */
.reveal{
  opacity:0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in{ opacity:1; transform:none; }

/* ===== Top nav ===== */
.nav{
  position: sticky; top:0; z-index: 50;
  display:flex; align-items:center; justify-content:space-between;
  padding: 18px 6vw;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .brand{ font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:18px; letter-spacing:.02em; }
.nav .brand span{ color: var(--accent); }
.nav .back{
  font-size:13px; font-family:'IBM Plex Mono', monospace; color: var(--muted);
  display:flex; align-items:center; gap:6px; text-decoration:none;
  padding:8px 14px; border:1px solid var(--line); border-radius:999px;
  transition: all .25s ease;
}
.nav .back:hover{ border-color: var(--accent); color: var(--accent-deep); transform: translateX(-2px); }

/* ===== HERO / TICKET-STYLE PASS (boarding pass, appointment pass, ledger, docket...) ===== */
.hero{ padding: 8vh 6vw 6vh; display:flex; justify-content:center; }
.pass{
  position: relative; width: 100%; max-width: 980px;
  display:grid; grid-template-columns: 1fr 230px;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
}
.pass::before{
  content:""; position:absolute; top:50%; transform:translateY(-50%);
  width: 34px; height:34px; border-radius:50%;
  background: var(--bg); border: 1px solid var(--line); z-index:3;
  left: calc(100% - 230px - 17px);
}
.pass-main{ padding: 46px 44px; position: relative; }
.pass-stub{
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  color: #fff; padding: 46px 26px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 18px;
  position: relative;
  border-left: 2px dashed rgba(255,255,255,0.32);
}
.eyebrow{
  font-family:'IBM Plex Mono', monospace; font-size:12px; letter-spacing:.14em;
  text-transform:uppercase; color: var(--accent-deep);
  display:flex; align-items:center; gap:10px;
}
.eyebrow::before{ content:""; width:22px; height:1px; background: var(--accent-deep); }
.pass-title{
  font-size: clamp(32px, 5.6vw, 60px);
  line-height: 1.03; margin: 14px 0 10px; font-weight: 700; letter-spacing: -0.01em;
}
.pass-tagline{ font-size: 17px; color: var(--muted); max-width: 480px; margin-bottom: 28px; }
.pass-meta{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 18px 30px; }
.pass-meta .field .label{
  font-family:'IBM Plex Mono', monospace; font-size:10.5px; letter-spacing:.12em;
  text-transform:uppercase; color: var(--muted); margin-bottom:5px;
}
.pass-meta .field .value{ font-size:15px; font-weight:600; }

.stub-code{
  writing-mode: vertical-rl; font-family:'IBM Plex Mono', monospace;
  letter-spacing:.3em; font-size:12px; opacity:.75;
}
.stub-icon{
  width:64px; height:64px; border-radius:16px;
  background: rgba(255,255,255,0.15);
  display:flex; align-items:center; justify-content:center;
  border: 1px solid rgba(255,255,255,0.35);
}
.stub-icon svg{ width:30px; height:30px; }
.stub-barcode{ display:flex; gap:2px; align-items:flex-end; height:36px; margin-top:6px; }
.stub-barcode span{ width:3px; background: rgba(255,255,255,0.7); }

/* generic caption line used under any signature/hero element */
.caption{
  text-align:center; font-size:14px; color: var(--muted); margin-top: 20px;
  max-width: 640px; margin-left:auto; margin-right:auto;
}

/* ===== Section shell ===== */
section{ padding: 4vh 6vw; }
.section-inner{ max-width: 980px; margin:0 auto; }
.section-head{ display:flex; align-items:baseline; gap:16px; margin-bottom: 34px; }
.section-head .num{ font-family:'IBM Plex Mono', monospace; color: var(--accent-deep); font-size:14px; }
.section-head h2{ font-size: clamp(24px,3vw,32px); }
.section-head .rule{ flex:1; height:1px; background: var(--line); }

/* ===== Tech tags ===== */
.stacks{ display:grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 720px){ .stacks{ grid-template-columns: 1fr; } }
.stack-card{ background: var(--paper); border:1px solid var(--line); border-radius:18px; padding: 26px 26px 22px; }
.stack-card .stack-label{
  font-family:'IBM Plex Mono', monospace; font-size:11px; text-transform:uppercase;
  color: var(--muted); letter-spacing:.1em; margin-bottom:16px; display:block;
}
.tags{ display:flex; flex-wrap:wrap; gap:10px; }
.tag{
  position:relative; display:flex; align-items:center; gap:8px;
  background: var(--bg); border:1px solid var(--line);
  padding: 8px 14px 8px 10px; border-radius: 8px 3px 3px 8px;
  font-size:13px; font-weight:500;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tag::before{ content:""; width:6px; height:6px; border-radius:50%; background: var(--accent2); flex-shrink:0; }
.tag:hover{
  transform: translateY(-3px) rotate(-1deg);
  border-color: var(--accent);
  box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ===== Worked-on list (stamped) ===== */
.stamped{ background: var(--paper); border:1px solid var(--line); border-radius: 18px; padding: 8px 0; }
.stamp-row{ display:flex; align-items:flex-start; gap:18px; padding: 20px 28px; border-bottom: 1px dashed var(--line); }
.stamp-row:last-child{ border-bottom:none; }
.stamp-mark{
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  border: 2px solid var(--stamp); color: var(--stamp);
  display:flex; align-items:center; justify-content:center;
  font-family:'IBM Plex Mono', monospace; font-size:13px; font-weight:600;
  transform: rotate(-8deg);
}
.stamp-row p{ margin:0; font-size:15px; line-height:1.65; color: var(--text-body); }

/* ===== About narrative ===== */
.about{ display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items:start; }
@media (max-width: 800px){ .about{ grid-template-columns:1fr; } }
.about p{ font-size:16px; line-height:1.8; color: var(--text-body); margin: 0 0 18px; }
.about-badge{
  background: linear-gradient(160deg, var(--badge-g1), var(--badge-g2));
  border:1px solid var(--badge-border); border-radius: 18px; padding: 26px;
}
.about-badge h3{ font-size:16px; margin-bottom:12px; }
.about-badge .why{ display:flex; gap:12px; margin-bottom: 16px; align-items:flex-start; }
.about-badge .why .ic{
  width:30px; height:30px; border-radius:8px; background:#fff; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; color: var(--accent-deep);
  border:1px solid var(--badge-border);
}
.about-badge .why p{ margin:0; font-size:13.5px; color: var(--badge-text); line-height:1.5; }

/* ===== Screenshot gallery (phone mockups) ===== */
.gallery{ display:flex; gap: 30px; overflow-x:auto; padding: 20px 4px 40px; scroll-snap-type: x proximity; }
.gallery::-webkit-scrollbar{ height:6px; }
.gallery::-webkit-scrollbar-thumb{ background: var(--line); border-radius:6px; }
.phone{ scroll-snap-align:start; flex-shrink:0; width: 220px; }
.phone-frame{
  width:220px; border-radius: 34px;
  background: var(--phone-dark);
  padding: 12px; box-shadow: var(--shadow);
  transition: transform .35s ease;
}
.phone:hover .phone-frame{ transform: translateY(-10px) rotate(-1deg); }
.phone-screen{
  width:100%; aspect-ratio: 709 / 1440; border-radius:24px; overflow:hidden; position:relative;
  background: linear-gradient(160deg, var(--screen-g1), var(--screen-g2)); /* shows briefly while the image loads */
}
.phone-screen img{ width:100%; height:100%; object-fit:cover; display:block; }
.phone-caption{ margin-top:14px; text-align:center; }
.phone-caption .t{ font-size:13px; font-weight:600; }
.phone-caption .s{ font-size:11px; color: var(--muted); font-family:'IBM Plex Mono',monospace; }

/* generic note line under galleries ("placeholder screens...") */
.note{ font-size:12px; color:var(--muted); font-family:'IBM Plex Mono',monospace; margin-top:-16px; }

/* ===== Generic stat strip (used by any project with 3 headline numbers) ===== */
.stats{ margin:0 6vw 8vh; max-width:980px; margin-left:auto; margin-right:auto; display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
@media (max-width:720px){ .stats{ grid-template-columns:1fr; } }
.stat{ background:var(--paper); border:1px solid var(--line); border-radius:16px; padding:22px 24px; text-align:center; }
.stat .num{ font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:30px; color:var(--accent-deep); }
.stat .lab{ font-family:'IBM Plex Mono', monospace; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-top:6px; }

/* ===== Generic badge row (used e.g. for security/trust badges) ===== */
.badge-row{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:22px; }
.mini-badge{
  display:flex; align-items:center; gap:8px; background:var(--bg); border:1px solid var(--line);
  border-radius:999px; padding:8px 14px; font-size:12.5px; font-weight:500; color: var(--text-body);
}
.mini-badge svg{ width:14px; height:14px; color:var(--accent); }

/* ===== Footer ===== */
footer{ padding: 8vh 6vw 6vh; text-align:center; }
footer .line{ width:60px; height:2px; background: var(--accent); margin: 0 auto 18px; border-radius:2px; }
footer p{ color: var(--muted); font-size:13px; font-family:'IBM Plex Mono', monospace; }

/* ===== Shared responsive rules ===== */
@media (max-width: 760px){
  .pass{ grid-template-columns: 1fr; }
  .pass-stub{ border-left:none; border-top:2px dashed rgba(255,255,255,0.32); flex-direction:row; }
  .pass::before{ display:none; }
  .pass-meta{ grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  .reveal{ opacity:1; transform:none; }
}