/* ═══════════════════════════════════════════════════════
   GRAPHIC-DESIGN.CSS — Section 04 (Iconiq Creatives)
   Portfolio grid · Hover overlays · Electric Blue
═══════════════════════════════════════════════════════ */

/* ── Section ───────────────────────────────────────── */
.graphic-design-section {
  background: #060606;
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
}

.graphic-design-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(65, 189, 254, 0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.gd-bg-num {
  position: absolute;
  top: clamp(16px, 3vw, 48px);
  left: clamp(12px, 4vw, 64px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(100px, 18vw, 220px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.03);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ── Eyebrow ────────────────────────────────────────── */
.gd-eyebrow {
  margin-bottom: clamp(40px, 6vw, 64px);
  position: relative;
  z-index: 1;
}

.gd-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-blue);
}

.gd-section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-blue);
  display: block;
  flex-shrink: 0;
}

/* ── Brand hero ─────────────────────────────────────── */
.gd-brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2vw, 22px);
  margin-bottom: clamp(48px, 7vw, 80px);
  position: relative;
  z-index: 1;
}

.gd-brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gd-brand-logo-img {
  max-height: clamp(60px, 10vw, 120px);
  max-width: clamp(240px, 50vw, 500px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 20px rgba(65,189,254,0.22));
  transition: filter 0.4s ease;
}

.gd-brand-logo-img:hover {
  filter: drop-shadow(0 0 38px rgba(65,189,254,0.5));
}

.gd-brand-name-fallback {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  color: var(--color-blue);
  letter-spacing: -0.02em;
}

.gd-brand-tagline {
  font-family: var(--font-body);
  font-size: clamp(var(--text-sm), 1.4vw, var(--text-base));
  color: var(--color-text-secondary);
  font-style: italic;
}

/* When the brand logo is removed, promote the tagline to a display heading. */
.gd-brand-hero--no-logo { margin-bottom: clamp(40px, 6vw, 64px); }

.gd-brand-hero--no-logo .gd-brand-tagline {
  font-family: var(--font-brand);
  font-weight: 800;
  font-style: normal;
  font-size: clamp(1.7rem, 5vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--color-white);
}

.gd-brand-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
}

.gd-ig-handle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: rgba(65,189,254,0.65);
  text-decoration: none;
  transition: color var(--t-fast);
}

.gd-ig-handle:hover { color: var(--color-blue); }

.gd-see-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border: 1px solid rgba(65,189,254,0.32);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--color-blue);
  text-decoration: none;
  transition:
    background var(--t-fast),
    border-color var(--t-fast),
    box-shadow var(--t-fast);
}

.gd-see-more-btn:hover {
  background: rgba(65,189,254,0.07);
  border-color: rgba(65,189,254,0.6);
  box-shadow: 0 0 20px rgba(65,189,254,0.1);
}

/* ── Footer CTA ─────────────────────────────────────── */
.gd-footer {
  display: flex;
  justify-content: center;
  margin-top: clamp(28px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

.gd-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border: 1px solid rgba(65,189,254,0.28);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
  color: var(--color-blue);
  text-decoration: none;
  transition:
    background var(--t-base),
    border-color var(--t-base),
    box-shadow var(--t-base),
    transform var(--t-base);
}
.gd-footer-cta svg { width: 13px; height: 13px; }

.gd-footer-cta:hover {
  background: rgba(65,189,254,0.07);
  border-color: rgba(65,189,254,0.55);
  box-shadow: 0 0 32px rgba(65,189,254,0.12);
  transform: translateY(-2px);
}

/* ── Grid — Instagram 3×3 ───────────────────────────── */
/* ── Description ─────────────────────────────────────── */
.gd-block-intro {
  text-align: center;
  max-width: 660px;
  margin: clamp(-8px, -0.5vw, 0px) auto clamp(28px, 4vw, 44px);
  position: relative;
  z-index: 1;
}
.gd-block-desc {
  font-family: var(--font-body);
  font-size: clamp(var(--text-sm), 1.4vw, var(--text-base));
  line-height: 1.65;
  color: var(--color-text-secondary);
}

/* ── Masonry grid of covers (preserves each design's full aspect ratio,
   aligned by natural height in columns) ── */
.gd-grid {
  column-count: 4;
  column-gap: 14px;
  position: relative;
  z-index: 1;
}
@media (max-width: 1024px) { .gd-grid { column-count: 3; } }
@media (max-width: 640px)  { .gd-grid { column-count: 2; column-gap: 10px; } }

.gd-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease-out-quart), transform 0.55s var(--ease-out-quart),
              box-shadow 0.3s ease;
}
@media (max-width: 640px) { .gd-item { margin-bottom: 10px; } }
.gd-item.in-view { opacity: 1; transform: none; }
.gd-item:hover { box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.7); }
.gd-item:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; }

.gd-item__img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  transition: transform 0.5s var(--ease-out-quart);
}
.gd-item:hover .gd-item__img { transform: scale(1.04); }

/* Share button on each tile — appears on hover (always shown on touch) */
.gd-item__share {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.gd-item__share svg { width: 15px; height: 15px; }
.gd-item__share:hover { background: rgba(65, 189, 254, 0.55); }
.gd-item:hover .gd-item__share,
.gd-item:focus-within .gd-item__share {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  .gd-item__share { opacity: 1; transform: none; }
}

.gd-item__label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.gd-item:hover .gd-item__label,
.gd-item:focus-visible .gd-item__label { opacity: 1; transform: none; }

/* ── Image lightbox (picture carousel) ── */
/* Lightbox — picture-only: the image fills the view, nav buttons sit
   centered over the picture, swipe/drag enabled. No side panel. */
.gd-lb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
}
.gd-lb[hidden] { display: none !important; }

.gd-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: gdLbFade 0.25s ease;
}
@keyframes gdLbFade { from { opacity: 0; } to { opacity: 1; } }

.gd-lb__panel {
  position: relative;
  z-index: 1;
  width: min(1000px, 100%);
  max-height: 90vh;
  animation: gdLbPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes gdLbPop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.gd-lb__close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 6;
  width: 38px;
  height: 38px;
  min-width: 0; min-height: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s;
}
.gd-lb__close svg { width: 17px; height: 17px; display: block; }
.gd-lb__close:hover { background: rgba(255, 255, 255, 0.2); }
@media (max-width: 640px) { .gd-lb__close { top: -6px; right: 0; } }
/* On touch/mobile the close button is replaced by swipe-up/down to dismiss */
@media (hover: none) { .gd-lb__close { display: none; } }

/* Share button — top-left, mirrors the close button; stays on touch too */
.gd-lb__share {
  position: absolute;
  top: -12px;
  left: -12px;
  z-index: 6;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.gd-lb__share svg { width: 16px; height: 16px; }
.gd-lb__share:hover { background: rgba(65, 189, 254, 0.35); transform: translateY(-1px); }
@media (max-width: 640px) { .gd-lb__share { top: -6px; left: 0; } }

/* Toast (share feedback) */
.gd-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 104px);
  transform: translateX(-50%) translateY(10px);
  z-index: 100000;
  background: rgba(18, 18, 24, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 18px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.gd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Stage — the image carousel */
.gd-lb__stage {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  touch-action: none;   /* JS handles both swipe (next) and pull-to-close */
  cursor: grab;
}
.gd-lb__stage:active { cursor: grabbing; }
.gd-lb__track {
  display: flex;
  will-change: transform;
}
.gd-lb__slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gd-lb__slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

/* Nav — centered vertically over the picture */
.gd-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  min-width: 0; min-height: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 12, 14, 0.62);
  color: #fff;
  font-size: 26px; line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.2s;
}
.gd-lb__nav:hover { background: rgba(0, 0, 0, 0.9); }
.gd-lb__prev { left: 14px; }
.gd-lb__next { right: 14px; }
.gd-lb__nav[hidden] { display: none; }
@media (hover: none) { .gd-lb__nav { display: none !important; } }

/* Dots — overlaid at the bottom of the picture */
.gd-lb__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px;
}
.gd-lb__dots[hidden] { display: none; }
.gd-lb__dot {
  width: 8px; height: 8px;
  min-width: 0; min-height: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transform-origin: center;
  transition: background 0.25s ease, transform 0.25s ease;
}
.gd-lb__dot[aria-current="true"] { background: #fff; }

body.gd-lb-open { overflow: hidden; }

@media (max-width: 640px) {
  .gd-lb__slide { height: 78vh; }
}

/* ── Card (legacy Instagram-feed styles, unused) ─────── */
.gd-card {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: #111111;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.gd-card.featured {
  grid-column: span 1;
  aspect-ratio: 1 / 1;
}

/* Image */
.gd-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out-quart), filter 0.4s ease;
  filter: brightness(0.9);
}

.gd-card:hover .gd-card-img {
  transform: scale(1.04);
  filter: brightness(0.55);
}

/* Placeholder (when no image) */
.gd-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d1a2a 0%, #0a0a0f 50%, #1a0d2a 100%);
  transition: filter 0.4s ease;
}

.gd-card:hover .gd-card-placeholder {
  filter: brightness(0.6);
}

.gd-placeholder-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  color: var(--color-blue);
  opacity: 0.35;
  transition: opacity 0.4s ease;
}

.gd-card:hover .gd-placeholder-mark {
  opacity: 0.15;
}

/* Overlay — slides up from bottom */
.gd-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(16px, 3vw, 24px);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.55) 50%,
    transparent 100%
  );
  transform: translateY(100%);
  transition: transform 0.38s var(--ease-out-quart), opacity 0.3s ease;
  opacity: 0;
}

.gd-card:hover .gd-overlay {
  transform: translateY(0);
  opacity: 1;
}

/* Overlay content */
.gd-overlay-category {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: var(--sp-2);
}

.gd-overlay-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: -0.02em;
  color: var(--color-white);
  margin-bottom: var(--sp-2);
  line-height: 1.15;
}

.gd-overlay-desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
  margin-bottom: var(--sp-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gd-overlay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gd-overlay-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.gd-tag {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.gd-overlay-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-blue);
  transition: gap 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.gd-overlay-link:hover {
  gap: 10px;
}

.gd-overlay-link.no-url {
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

/* Year badge */
.gd-year-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
  transition: opacity 0.2s ease;
}

.gd-card:hover .gd-year-badge {
  opacity: 0;
}

/* ── Brand Info ─────────────────────────────────────── */
.gd-brand-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-3);
  align-self: flex-start;
  flex-shrink: 0;
}

.gd-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 28px;
  border: 1px solid rgba(65, 189, 254, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(65, 189, 254, 0.04);
  position: relative;
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.gd-brand-info:hover .gd-brand-logo {
  border-color: rgba(65, 189, 254, 0.4);
  background: rgba(65, 189, 254, 0.07);
  box-shadow: 0 0 48px rgba(65, 189, 254, 0.12), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gd-brand-logo-img {
  max-height: 76px;
  max-width: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: filter var(--t-base);
  filter: brightness(0.95);
  display: block;
}

.gd-brand-info:hover .gd-brand-logo-img { filter: brightness(1.08); }

.gd-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-blue);
}

.gd-brand-tagline {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  text-align: right;
}

.gd-brand-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--color-blue);
  text-decoration: none;
  transition: opacity var(--t-fast), gap var(--t-fast);
}

.gd-brand-social:hover { opacity: 0.7; gap: 9px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
  .gd-brand-actions { flex-direction: column; align-items: center; gap: var(--sp-3); }
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .gd-card-img {
    transition: none;
  }

  .gd-overlay {
    transform: none;
    opacity: 1;
    transition: none;
  }
}
