/* ================================================================
   Visual Polish Layer — trenthnguyen.com
   Revert everything: remove the single
     <link rel="stylesheet" href="polish.css">
   tag from any page, or delete this file.
   ================================================================ */


/* ── 1. Work card thumbnails: UI screenshots instead of generic photos ────── */

/* SWGas redesign card: actual website screenshot instead of construction photo */
.thumb-swg-redesign {
  background-image: url('images/swg/swgas-home-v2-desktop.png');
  background-position: top center;
  background-size: cover;
}

/* Nissan card: website screenshot instead of car photo */
.thumb-nissan {
  background-image: url('images/nissan/desktop-rogue-new.png');
  background-position: top center;
  background-size: cover;
}

/* HCA DRW card: app dashboard screenshot instead of SVG diagram */
.thumb-hca-drw {
  background-image: url('images/hca/support-dashboard-reporting.png');
  background-position: top center;
  background-size: cover;
}


/* ── 4. Section transitions: accent bar as chapter divider ───────────────── */

/* Short colored bar before every cs-section that follows another */
.cs-section + .cs-section::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  margin-bottom: 1.25rem;
}


/* ── 5. Typography: larger, slightly heavier section headings ────────────── */

/* Bump cs-section h2 from clamp(1.5rem,2.8vw,2.1rem) up to 2.6rem max */
.cs-section h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 500;
}


/* ── Browser / device chrome frames ─────────────────────────────────────── */

/*
  How it works:
  - Add class "frame-browser" to an .lb-wrap or <figure> element.
  - A ::before pseudo inserts a 30px chrome bar (traffic-light dots + URL pill)
    above the screenshot using pure radial-gradient + linear-gradient backgrounds.
  - No extra HTML needed. Revert by removing the class or deleting polish.css.
*/

/* Shared chrome bar colors */
:root {
  --chrome-bg:       #edeae3;
  --chrome-border:   rgba(0, 0, 0, 0.09);
  --chrome-dot-red:  #ff5f56;
  --chrome-dot-yel:  #ffbd2e;
  --chrome-dot-grn:  #27c93f;
  --chrome-urlbar:   rgba(0, 0, 0, 0.075);
}

/* ── lb-wrap version (design-work.html gallery cards) ── */
.lb-wrap.frame-browser {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 12px 40px -12px rgba(0, 0, 0, 0.22);
  background: var(--chrome-bg);
}

.lb-wrap.frame-browser::before {
  content: '';
  display: block;
  height: 30px;
  flex-shrink: 0;
  background-color: var(--chrome-bg);
  background-image:
    /* traffic lights */
    radial-gradient(circle at 14px 15px, var(--chrome-dot-red) 4.5px, transparent 4.5px),
    radial-gradient(circle at 28px 15px, var(--chrome-dot-yel) 4.5px, transparent 4.5px),
    radial-gradient(circle at 42px 15px, var(--chrome-dot-grn) 4.5px, transparent 4.5px),
    /* url bar pill */
    linear-gradient(var(--chrome-urlbar) 0%, var(--chrome-urlbar) 100%);
  background-repeat: no-repeat;
  background-size:
    auto,
    auto,
    auto,
    calc(100% - 140px) 16px;
  background-position:
    0 0,
    0 0,
    0 0,
    70px 7px;
  border-bottom: 1px solid var(--chrome-border);
}

/* ── figure version (case study cs-figure elements) ── */
figure.frame-browser {
  position: relative;
  background: var(--chrome-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 24px 50px -20px rgba(0, 0, 0, 0.25),
    0 4px 12px -4px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--line);
  margin: 2rem 0 0.5rem;
}

figure.frame-browser::before {
  content: '';
  display: block;
  height: 30px;
  background-color: var(--chrome-bg);
  background-image:
    radial-gradient(circle at 14px 15px, var(--chrome-dot-red) 4.5px, transparent 4.5px),
    radial-gradient(circle at 28px 15px, var(--chrome-dot-yel) 4.5px, transparent 4.5px),
    radial-gradient(circle at 42px 15px, var(--chrome-dot-grn) 4.5px, transparent 4.5px),
    linear-gradient(var(--chrome-urlbar) 0%, var(--chrome-urlbar) 100%);
  background-repeat: no-repeat;
  background-size:
    auto,
    auto,
    auto,
    calc(100% - 140px) 16px;
  background-position:
    0 0,
    0 0,
    0 0,
    70px 7px;
  border-bottom: 1px solid var(--chrome-border);
}

/* Strip per-image styles when the figure is acting as the frame */
figure.frame-browser img {
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  display: block;
  width: 100%;
}

figure.frame-browser figcaption {
  padding: 0.75rem 1rem;
  margin-top: 0;
}


/* ── Insight block: dark card treatment ──────────────────────────────────── */

/*
  .insight becomes a fully dark card (--accent background, white text, gold
  left border) so it reads as a distinct design element rather than a tinted
  quote box. .cs-callout keeps its light treatment as contrast.
*/

.insight {
  background: var(--accent);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 1.75rem 2rem;
  max-width: 68ch;
  margin: 2rem 0;
}

.insight .label {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.16em;
}

.insight p {
  color: rgba(255, 255, 255, 0.93);
  font-size: 1.2rem;
  line-height: 1.55;
}

/* cs-callout: punch up slightly — bolder border, slightly larger quote text */
.cs-callout {
  border-left-width: 4px;
  padding: 1.75rem 2rem;
  border-radius: 0 10px 10px 0;
}

.cs-callout-text {
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
}


/* ── Design-work tab card hover preview ──────────────────────────────────── */

/*
  On hover, a small screenshot preview fades in below each tab card.
  Pure CSS: uses ::after with per-card background-image, absolute positioning,
  and opacity + transform transition. Hidden on the active card.
  Revert: remove polish.css.
*/

/* Ensure preview can overflow the nav strip without clipping */
.dw-index,
.dw-index-grid {
  overflow: visible;
}

.dw-index-card {
  position: relative;
}

/* Preview panel base */
.dw-index-card::after {
  content: '';
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.96);
  width: 220px;
  height: 138px;
  border-radius: 10px;
  background-size: cover;
  background-position: top center;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 12px 40px -8px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  z-index: 100;
}

/* Show on hover, hide on active (panel already visible) */
.dw-index-card:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.dw-index-card.is-active::after {
  display: none;
}

/* Small connecting arrow (triangle) */
.dw-index-card::before {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.1));
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  z-index: 101;
}

.dw-index-card:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.dw-index-card.is-active::before {
  display: none;
}

/* Per-tab preview images */
.dw-index-card[data-tab="wynn"]::after {
  background-image: url('images/wynn/Wynn Las Vegas Booking Flow.png');
}
.dw-index-card[data-tab="southwest-gas"]::after {
  background-image: url('images/swg/swgas-home-v2-desktop.png');
}
.dw-index-card[data-tab="vca"]::after {
  background-image: url('images/vca/vca-macbook-mockup.png');
}
.dw-index-card[data-tab="sdge"]::after {
  background-image: url('images/sdge/sdge-bill-pay-dashboard.png');
}
.dw-index-card[data-tab="ups"]::after {
  background-image: url('images/ups/UPS Shipping.png');
}
.dw-index-card[data-tab="mazda"]::after {
  background-image: url('images/Mazda/mazda-dark-editorial.png');
}


/* ── 6. Design-work tab card descriptions ────────────────────────────────── */

.dw-index-desc {
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.4;
  margin-top: 0.1rem;
  transition: color 0.18s;
}

.dw-index-card:hover .dw-index-desc,
.dw-index-card.is-active .dw-index-desc {
  color: rgba(255, 255, 255, 0.7);
}
