/* ==========================================================================
   Porchlink v1.0.0 - gallery.css (the kit's start page, index.html)
   You do not need this page on your live site; it only shows the ten themes.

   TABLE OF CONTENTS
   1. Colours ("haint blue" porch ceiling + porch-light amber)
   2. Layout and header
   3. Hero with theme picker and lit phone (signature)
   4. Phone frames (scaled live previews)
   5. All-themes grid
   6. Features and steps
   7. Footer, responsive, reduced motion
   ========================================================================== */
/* 1. Colours */
[data-theme="gallery"] {
  --bg: #CFE3E2; --surface: #F6FAF9; --ink: #1F2D3A; --muted: #4C5D69;
  --accent: #F2B33D; --accent-ink: #1F2D3A; --line: rgba(31, 45, 58, .16); --focus: #1F2D3A;
  --trim: #FAFBFA; --wood: #8A5A3B; --glow: rgba(242, 179, 61, .55);
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif; --font-body: 'Instrument Sans', system-ui, sans-serif;
}
[data-theme="gallery"][data-mode="dark"] {
  --bg: #17222D; --surface: #1F2D3A; --ink: #E8F0EF; --muted: #A6B6BF;
  --accent: #F6C453; --accent-ink: #17222D; --line: rgba(232, 240, 239, .14); --focus: #F6C453;
  --trim: #22323F; --glow: rgba(246, 196, 83, .35);
}
/* 2. Layout and header */
.g-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.g-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; gap: 12px; }
.g-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.g-logo svg { width: 30px; height: 30px; }
.g-head nav { display: flex; gap: 6px; align-items: center; }
.g-head nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.g-head nav a:hover { background: var(--surface); }
@media (max-width: 560px) { .g-head nav a { display: none; } }

/* 3. Hero */
.g-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; padding: 28px 0 64px; }
.g-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: .98; letter-spacing: -.04em; max-width: 12ch; }
.g-lede { font-size: 1.15rem; max-width: 46ch; margin: 18px 0 28px; color: var(--muted); }
.g-picker { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; }
.g-picker button {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .95rem;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.g-picker button:hover { transform: translateY(-1px); }
.g-picker button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.g-dots { display: inline-flex; }
.g-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--surface); margin-left: -5px; }
.g-dots i:first-child { margin-left: 0; }
.g-current { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.g-current strong { font-family: var(--font-display); font-size: 1.3rem; }
.g-current span { color: var(--muted); }
.g-current a { font-weight: 600; }

/* Signature: the selected phone hangs under a porch light */
.g-stage { position: relative; padding-top: 70px; }
.g-lamp { position: absolute; top: 0; left: 50%; width: 64px; transform: translateX(-50%); z-index: 2; }
.g-lamp svg { width: 64px; height: 54px; }
.g-beam {
  position: absolute; top: 40px; left: 50%; width: 520px; height: 640px; transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 60% at 50% 0%, var(--glow), transparent 70%);
  pointer-events: none; z-index: 0; transition: opacity .6s var(--ease);
}
.g-stage.is-switching .g-beam { opacity: .35; }
.g-stage .g-phone { position: relative; z-index: 1; }

/* 4. Phone frames: a 390x844 page scaled by --s */
.g-phone {
  display: block; --s: .74; width: calc(390px * var(--s) + 20px); padding: 10px; border-radius: 40px;
  background: var(--ink); box-shadow: 0 30px 60px -30px rgba(10, 20, 30, .55);
}
.g-screen { display: block; width: calc(390px * var(--s)); height: calc(844px * var(--s)); border-radius: 30px; overflow: hidden; background: var(--surface); position: relative; }
.g-screen iframe { width: 390px; height: 844px; border: 0; transform: scale(var(--s)); transform-origin: 0 0; display: block; }
.g-stage .g-screen iframe { transition: opacity .3s var(--ease); }
.g-stage.is-switching .g-screen iframe { opacity: 0; }

/* 5. All-themes grid */
.g-section { padding: 56px 0; border-top: 1px solid var(--line); }
.g-section h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 10px; }
.g-section > .g-wrap > p { color: var(--muted); max-width: 56ch; margin-bottom: 32px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px 20px; }
.g-card { text-decoration: none; display: grid; gap: 12px; justify-items: center; }
.g-card .g-phone { --s: .5; border-radius: 30px; padding: 8px; transition: transform .3s var(--ease); }
.g-card .g-phone .g-screen { border-radius: 23px; }
.g-card .g-screen iframe { pointer-events: none; }
.g-card:hover .g-phone { transform: translateY(-6px); }
.g-card-text { text-align: center; }
.g-card-text strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }
.g-card-text span { color: var(--muted); font-size: .92rem; }

/* 6. Features and steps */
.g-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 32px; }
.g-feature { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.g-feature svg { width: 28px; height: 28px; color: var(--wood); }
[data-mode="dark"] .g-feature svg { color: var(--accent); }
.g-feature h3 { font-size: 1.05rem; margin-bottom: 2px; }
.g-feature p { color: var(--muted); font-size: .95rem; }
.g-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.g-steps li { counter-increment: step; padding: 22px; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); }
.g-steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 12px; }
.g-steps h3 { font-size: 1.05rem; margin-bottom: 4px; }
.g-steps p { color: var(--muted); font-size: .95rem; }
.g-steps code { font-size: .88em; background: var(--bg); padding: 1px 5px; border-radius: 5px; }

/* 7. Footer, responsive, reduced motion */
.g-foot { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) {
  .g-hero { grid-template-columns: 1fr; gap: 24px; }
  .g-stage { justify-self: center; }
}
@media (max-width: 420px) {
  .g-stage .g-phone { --s: .66; }
  .g-beam { width: 100vw; }
}
@media (max-width: 340px) { .g-stage .g-phone { --s: .62; } .g-grid { grid-template-columns: 1fr; } }
