← back to Dw Photo Capture

public/themes/v15-giant-words.html

160 lines

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>v15 — Giant Words</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
<style>
  :root{
    --yellow:#f5e663;
    --grey:#9a9a9a;
    --focus:#ffffff;
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;background:#0a0a0a;font-family:'Inter',system-ui,sans-serif;}
  .stage{
    width:390px;height:780px;margin:24px auto;position:relative;display:block;
    background:#000;border-radius:36px;overflow:hidden;border:8px solid #000;
    box-shadow:0 20px 60px rgba(0,0,0,.5),0 0 0 1px #222;color:#fff;
  }
  @media (max-width:405.98px){
    .stage{width:100%;margin:0;border:0;border-radius:0;box-shadow:none;height:100vh;height:100dvh;min-height:640px;}
  }
  .screen{
    position:absolute;inset:0;display:none;flex-direction:column;gap:14px;
    padding:18px 20px 18px;overflow-y:auto;background:#000;
  }
  .screen.is-active{display:flex;}
  .screen.yellow{background:var(--yellow);color:#000;--focus:#000000;}
  .top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;flex-shrink:0;}
  .step{margin:0;font-size:13px;font-weight:600;color:var(--grey);}
  .yellow .step{color:#555;}   /* Figma #9a9a9a on yellow → #555 for 4.5:1 */
  .home{
    background:#1f1f1f;color:#fff;border-radius:14px;padding:0 16px;font-size:15px;font-weight:800;letter-spacing:.04em;
  }
  .yellow .home{background:#000;color:var(--yellow);}
  h1,.giant{margin:0;font-size:clamp(56px,18vw,72px);font-weight:800;line-height:1;letter-spacing:-.02em;}
  h1:focus{outline:none;}
  button{font:inherit;cursor:pointer;border:0;min-height:44px;min-width:44px;color:inherit;}
  button:focus-visible{outline:3px solid var(--focus);outline-offset:3px;}

  .words{display:flex;flex-direction:column;gap:6px;}
  .word{
    background:transparent;color:#fff;text-align:left;padding:4px 0;
    font-size:clamp(56px,18vw,72px);font-weight:800;line-height:1.05;letter-spacing:-.02em;
    border-radius:10px;width:100%;
  }
  .word:hover{color:var(--yellow);}
  .word .arrow{font-size:.45em;vertical-align:middle;opacity:0;margin-left:8px;transition:opacity .15s;}
  .word:hover .arrow,.word:focus-visible .arrow{opacity:1;}
  .hint{margin:0;font-size:18px;color:var(--grey);text-align:center;}
  .spacer{flex:1;}
  .big{width:100%;min-height:110px;border-radius:20px;font-size:22px;font-weight:800;padding:0 16px;flex-shrink:0;letter-spacing:.02em;}
  .big.y{background:var(--yellow);color:#000;}
  .big.w{background:#fff;color:#000;}
  .big.g{background:#333;color:#fff;}
  .big.k{background:#000;color:var(--yellow);min-height:96px;}
  .camera{
    flex:1;min-height:220px;background:#222;border-radius:24px;display:flex;align-items:center;justify-content:center;
    color:#fff;font-size:18px;font-weight:600;position:relative;
  }
  .camera::after{content:"";position:absolute;inset:20%;border:3px solid rgba(245,230,99,.55);border-radius:14px;}
  .shutter-row{display:flex;justify-content:center;flex-shrink:0;}
  .shutter{width:96px;height:96px;border-radius:50%;background:var(--yellow);border:6px solid #fff;}
  .swatch{
    height:240px;flex-shrink:0;border-radius:24px;background:#b9a27a;display:flex;align-items:center;justify-content:center;
  }
  .pill{background:rgba(0,0,0,.72);color:#fff;padding:10px 16px;border-radius:999px;font-size:18px;font-weight:600;}
  .got{font-size:clamp(64px,20vw,80px);color:#000;} /* Figma white on yellow → black for contrast */
  .meta{margin:0;font-size:24px;font-weight:800;color:#000;}
  .toast{
    position:absolute;left:50%;bottom:120px;transform:translateX(-50%) translateY(10px);
    background:#fff;color:#000;padding:12px 18px;border-radius:14px;font-size:16px;font-weight:800;
    opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s,transform .2s,visibility 0s .2s;max-width:86%;text-align:center;z-index:5;
  }
  .toast.show{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0);transition:opacity .2s,transform .2s,visibility 0s;}
  @media (prefers-reduced-motion:reduce){ .toast,.toast.show{transition:none} }
</style>
</head>
<body>
<main class="stage" id="app">

  <section class="screen is-active" data-screen="1" aria-labelledby="h1-1">
    <div class="top"><p class="step">1 / 4 · Home</p></div>
    <h1 id="h1-1" class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;">What do you want to do?</h1>
    <div class="words">
      <button class="word" data-go="3" data-mode="NEW">NEW<span class="arrow" aria-hidden="true">→</span></button>
      <button class="word" data-go="3" data-mode="FIX">FIX<span class="arrow" aria-hidden="true">→</span></button>
      <button class="word" data-go="2">FIND<span class="arrow" aria-hidden="true">→</span></button>
      <button class="word" data-go="3" data-mode="SAMPLE">SAMPLE<span class="arrow" aria-hidden="true">→</span></button>
    </div>
    <div class="spacer"></div>
    <p class="hint">Tap a word.</p>
  </section>

  <section class="screen" data-screen="2" aria-labelledby="h1-2">
    <div class="top">
      <p class="step">2 / 4 · FIND</p>
      <button class="home" data-go="1">⌂ HOME</button>
    </div>
    <h1 id="h1-2">FIND</h1>
    <div class="spacer"></div>
    <button class="big y" data-go="3" data-mode="FIND">📷&nbsp;&nbsp;SCAN</button>
    <button class="big w" data-toast="🎤 Listening…">🎤&nbsp;&nbsp;SAY IT</button>
    <button class="big g" data-toast="⌨️ Keyboard would open">⌨️&nbsp;&nbsp;TYPE IT</button>
  </section>

  <section class="screen" data-screen="3" aria-labelledby="h1-3">
    <div class="top">
      <p class="step" id="step3">3 / 4 · Scan</p>
      <button class="home" data-go="1">⌂ HOME</button>
    </div>
    <h1 id="h1-3">POINT.</h1>
    <div class="camera" role="img" aria-label="Camera viewfinder">▢</div>
    <div class="shutter-row"><button class="shutter" aria-label="Take photo" data-go="4"></button></div>
  </section>

  <section class="screen yellow" data-screen="4" aria-labelledby="h1-4">
    <div class="top">
      <p class="step">4 / 4 · Got it</p>
      <button class="home" data-go="1">⌂ HOME</button>
    </div>
    <h1 id="h1-4" class="got">GOT IT.</h1>
    <div class="swatch" role="img" aria-label="Linen — Oat swatch"><span class="pill">Linen — Oat</span></div>
    <p class="meta">Linen — Oat · Kravet</p>
    <div class="spacer"></div>
    <button class="big k" data-toast="Opening Linen — Oat…">OPEN IT</button>
  </section>

  <div class="toast" id="toast" role="status" aria-live="polite"></div>
</main>

<script>
  const screens = Array.from(document.querySelectorAll('[data-screen]'));
  const toastEl = document.getElementById('toast');
  let toastTimer = null;
  function go(n){
    n = String(n);
    screens.forEach(s => s.classList.toggle('is-active', s.dataset.screen === n));
    const h = document.getElementById('h1-' + n);
    if (h && document.activeElement && document.activeElement !== document.body){
      h.setAttribute('tabindex','-1'); h.focus({preventScroll:true});
    }
  }
  function toast(msg){
    toastEl.textContent = msg; toastEl.classList.add('show');
    clearTimeout(toastTimer); toastTimer = setTimeout(() => toastEl.classList.remove('show'), 1600);
  }
  document.addEventListener('click', (e) => {
    const b = e.target.closest('button'); if (!b) return;
    if (b.dataset.mode) document.getElementById('step3').textContent = '3 / 4 · Scan · ' + b.dataset.mode;
    if (b.dataset.toast) toast(b.dataset.toast);
    if (b.dataset.go) go(b.dataset.go);
  });
</script>
<script>window.__theme = {id:'v15', name:'Giant Words', screens:4};</script>
</body>
</html>