/* =========================
   Tokens and Resets
========================= */
:root{
  --rail-max: 1160px;
  --rail-pad: clamp(16px, 4vw, 40px);

  --ink-900: #1f1f1f;
  --ink-600: #2b3147;
  --ink-400: #5f6b7a;

  --brand: #165c7d;

  --btn-blue: #398FBA;
  --btn-pink: #FF6C63;

  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

*{ box-sizing: border-box; margin: 0; padding: 0; }

/* =========================
   Section wrapper
========================= */
.wire-frame{
  width: 100%;
  text-align: center;
  padding: clamp(40px, 6vw, 72px) var(--rail-pad);
  animation: fadeIn .6s ease both;
}

/* =========================
   Header
========================= */
.wf-title{
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(8px);
  animation: riseIn .6s ease .05s forwards;
}

/* =========================
   Image, smaller and stylish
========================= */
.wf-figure{
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
}

.wireframe-img{
  max-width: 75%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background-color:#F5F5F5;
  transition: transform .35s ease, box-shadow .35s ease, filter .35s ease;
  opacity: 0;
  transform: translateY(10px) scale(.98);
  animation: popIn .7s cubic-bezier(.2,.7,.3,1) .18s forwards;
}

@media (hover: hover) and (pointer: fine){
  .wireframe-img:hover{
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 26px 60px rgba(0,0,0,.16);
    filter: saturate(1.03) contrast(1.03);
  }
}

/* =========================
   Secondary button (.wf-link)
   White base, blue border/text, pink sweep L→R on hover
========================= */
.wf-link{
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 22px;
  padding: 14px 28px;
  border-radius: 10px;
  border: 3px solid var(--btn-blue);
  color: var(--btn-blue);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-size .32s ease,
    color .18s ease,
    border-color .18s ease,
    transform .06s ease,
    box-shadow .18s ease;
}

/* remove any older overlay so effects do not stack */
.wf-link::before{ content: none !important; }

/* hover: pink fills left→right, text flips to white */
.wf-link:hover{
  background:
    linear-gradient(var(--btn-pink), var(--btn-pink)) left center / 100% 100% no-repeat,
    #fff;
  color: #fff;
  border-color: var(--btn-pink);
  transform: none;
}

/* active and focus */
.wf-link:active{ transform: translateY(1px); }
.wf-link:focus-visible{
  outline: 3px solid rgba(255,108,99,.45);
  outline-offset: 2px;
}

/* icons follow current text color */
.wf-link svg,
.wf-link svg *{
  fill: currentColor;
  stroke: currentColor;
}

/* =========================
   Keyframes
========================= */
@keyframes fadeIn{
  from{ opacity: 0; } to{ opacity: 1; }
}
@keyframes riseIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}
@keyframes popIn{
  0%{ opacity: 0; transform: translateY(10px) scale(.98); }
  60%{ opacity: 1; transform: translateY(-2px) scale(1.01); }
  100%{ opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================
   Reduced motion preference
========================= */
@media (prefers-reduced-motion: reduce){
  .wire-frame,
  .wf-title,
  .wireframe-img,
  .wf-link{ animation: none !important; }
  .wireframe-img{ transition: none; }
}

/* =========================
   Optional scrollbar polish
========================= */
.wf-figure::-webkit-scrollbar{ height: 10px; }
.wf-figure::-webkit-scrollbar-track{ background: #f2f2f2; }
.wf-figure::-webkit-scrollbar-thumb{
  background: var(--brand);
  border-radius: 10px;
}

/* =========================
   Legacy class support
========================= */
.frame-2333{ padding: 0; }
.button, .text-container{ display: contents; }
.view-figma{
  color: var(--brand);
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
}

/* =========================
   Tap to zoom overlay
========================= */
.zoom-overlay{
  position: fixed;
  inset: 0;
  background: #fff !important;   /* white background instead of black */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.zoom-overlay.is-open{ display: flex; }
body.modal-open{ overflow: hidden; }

.zoom-stage{
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pinch-zoom pan-x pan-y;
  transform: none !important;
  perspective: none !important;
}

.zoom-img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform: none !important;
  transition: transform .25s ease;
  cursor: zoom-out;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.zoom-img.is-zoomed{ transform: scale(1.35) !important; }

/* close button on white background */
.zoom-close{
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.08) !important;
  color: #000 !important;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.zoom-close:hover{ background: rgba(0,0,0,.18) !important; transform: translateY(-1px); }
.zoom-close:focus-visible{ outline: 3px solid rgba(0,0,0,.35); outline-offset: 2px; }


.wf-hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-400);
  font-family: "Montserrat", sans-serif;
}
.wf-hint::before {
  content: "🔍 ";
}
