/*
 * Triple e Digital — Website Design & SEO Service Page
 * webseo.css — this page's hero, loads AFTER branding.css
 *
 * DEPLOY:
 * 1. Upload to /templates/wavo/css/webseo.css
 * 2. Load from the first Custom HTML addon on the page (the STYLES row in
 *    that page's sections file), in this order:
 *      <link rel="stylesheet" href="/templates/wavo/css/branding.css">
 *      <link rel="stylesheet" href="/templates/wavo/css/webseo.css">
 * 3. Menu item → Page Display → Page Class: te-branding-page
 *
 * This file adds the "Websites People Actually Find" hero. It uses the
 * site fonts already loaded (Bayon, Geist, Questrial), so no extra font link.
 * It also makes this page's portfolio cards wider. Everything else uses branding.css as-is.
 */

/* ══ WEB & SEO HERO ═════════════════════════════════════════════════════════ */
.wh-hero {
  --header-h:110px;      /* JS overwrites this with the real #sp-header height */
  position:relative; z-index:2;
  background:var(--k); color:var(--w);
}
.wh-hero *, .wh-hero *::before, .wh-hero *::after { box-sizing:border-box; margin:0; padding:0; }
.wh-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

.wh-track { position:relative; height:300vh; }
.wh-sheet {
  position:sticky; top:0;
  height:100vh; height:100svh;
  overflow:clip;
  display:grid; place-items:center;
  padding:calc(var(--header-h) + 24px) 16px 32px;
  background:var(--k);
}

/* ghosted background word, revealed with the result */
.wh-ghost {
  position:absolute; left:50%; top:54%; transform:translate(-50%,-50%);
  font-family:'Bayon',sans-serif; font-size:clamp(140px,30vw,460px); line-height:.8;
  color:rgba(255,255,255,.05); white-space:nowrap; pointer-events:none; user-select:none;
  opacity:0; transition:opacity .9s ease;
}
.wh-hero.is-done .wh-ghost { opacity:1; }

.wh-stage { position:relative; z-index:1; width:min(1040px,100%); display:grid; gap:22px; }

/* eyebrow: same as every eyebrow on the site (16px, 60px × 1px line in the text color) */
.wh-eyebrow { font-family:'Questrial',sans-serif; font-size:16px; font-weight:400; letter-spacing:3px; text-transform:uppercase; color:var(--b); display:flex; align-items:center; gap:10px; }
.wh-eyebrow::before { content:''; display:block; width:60px; height:1px; background:currentColor; flex-shrink:0; }

/* the search bar */
.wh-bar {
  display:flex; align-items:center; gap:clamp(12px,2vw,22px);
  background:var(--w); color:var(--k);
  border-radius:999px;
  padding:clamp(16px,2.2vw,26px) clamp(18px,2.6vw,30px);
  box-shadow:0 0 0 0 var(--y);
  transition:box-shadow .35s;
}
.wh-bar.is-sent { box-shadow:0 0 0 4px var(--y); }
.wh-glass { width:clamp(22px,2.6vw,34px); height:auto; flex-shrink:0; color:var(--ch); }
.wh-field {
  flex:1; min-width:0;
  font-family:'Geist',sans-serif; font-weight:800;
  /* sized so the full final query plus cursor fits on one line in Geist 800
     (it measures about 14.9em wide), and held to one line so the bar never grows */
  font-size:clamp(22px, calc((100vw - 240px) / 15.4), 50px); line-height:1.15; letter-spacing:-.01em;
  white-space:pre; overflow:hidden;
}
.wh-placeholder { color:#b9b9b9; font-weight:400; font-family:'Questrial',sans-serif; }
.wh-caret {
  display:inline-block; width:.09em; height:1em; margin-left:.04em;
  background:var(--b); vertical-align:-.12em;
  animation:wh-blink 1s steps(1) infinite;
}
.wh-hero.is-typing .wh-caret { animation:none; opacity:1; }
@keyframes wh-blink { 50% { opacity:0; } }

/* Enter key: presses down when the query is sent */
.wh-key {
  flex-shrink:0;
  font-family:'Questrial',sans-serif; font-size:12px; letter-spacing:2px; text-transform:uppercase;
  color:var(--ch); border:1.5px solid #d6d6d6; border-radius:10px; box-shadow:0 3px 0 #d6d6d6;
  padding:9px 14px 7px; display:flex; align-items:center; gap:8px;
  transition:transform .08s, box-shadow .08s, background .15s, color .15s, border-color .15s;
}
.wh-key b { font-weight:400; font-size:16px; line-height:1; }
.wh-key.is-down { transform:translateY(3px); box-shadow:0 0 0 #d6d6d6; background:var(--y); border-color:var(--k); color:var(--k); }

/* line under the bar: hint before typing, result count after enter.
   margin-top adds breathing room between the bar and everything below it. */
.wh-meta { margin-top:clamp(12px,4vh,40px); position:relative; height:18px; padding-left:clamp(18px,2.6vw,30px); font-family:'Questrial',sans-serif; font-size:12px; letter-spacing:2px; text-transform:uppercase; }
.wh-meta span { position:absolute; left:clamp(18px,2.6vw,30px); top:0; white-space:nowrap; }
.wh-hint { color:rgba(255,255,255,.4); }
.wh-count { color:rgba(255,255,255,.4); opacity:0; transition:opacity .3s; }
.wh-hero.is-done .wh-count { opacity:1; }

/* the one search result: plays on its own once the query is sent */
.wh-result {
  padding-left:clamp(18px,2.6vw,30px); max-width:760px;
  opacity:0; transform:translateY(50px);
  transition:opacity .5s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.wh-hero.is-done .wh-result { opacity:1; transform:none; }
.wh-url { font-family:'Questrial',sans-serif; font-size:14px; color:rgba(255,255,255,.5); margin-bottom:8px; }
.wh-url span { margin:0 4px; }
.wh-title { font-family:'Geist',sans-serif; font-weight:800; font-size:clamp(22px,2.6vw,34px); line-height:1.15; color:var(--y); margin-bottom:12px; }
.wh-snippet { font-family:'Questrial',sans-serif; font-size:clamp(16px,1.5vw,19px); line-height:1.65; color:rgba(255,255,255,.7); max-width:62ch; }

/* ══ PORTFOLIO: wider cards on this page ═════════════════════════════════
   The website mockups are 533×400 landscape. At the shared 200px width they
   would be 200×150 and the sites would be hard to see, so this page uses
   266px cards: 266×200, half of 533 so they stay sharp on retina screens,
   and the same height as the square cards on Print and Packaging.
   Capped at 18.5vw so neighboring cards don't touch on smaller laptops.
   Scoped to .wh-para so it only touches this page's portfolio. */
.wh-para { --W:min(266px,18.5vw); }
@media (max-width:768px){ .wh-para { --W:min(200px,28vw); } }
@media (max-width:480px){ .wh-para { --W:min(150px,36vw); } }

@media (max-width:600px){
  .wh-bar { border-radius:22px; align-items:flex-start; }
  .wh-glass { margin-top:4px; }
  .wh-key { display:none; }
  /* phones: the query wraps, so reserve both lines up front and the bar never jumps */
  .wh-field { font-size:clamp(22px,6.2vw,34px); min-height:2.3em; white-space:pre-wrap; overflow:visible; }
  .wh-stage { gap:18px; }
}
@media (orientation:landscape) and (max-height:520px){
  .wh-sheet { padding-top:calc(var(--header-h) + 8px); padding-bottom:12px; }
  .wh-stage { gap:12px; }
  .wh-meta { margin-top:4px; }
  .wh-field { font-size:clamp(20px,3.6vw,40px); }
  .wh-snippet { font-size:15px; }
}
@media (prefers-reduced-motion:reduce){
  .wh-track { height:auto; }
  .wh-sheet { position:relative; height:auto; min-height:100vh; }
  .wh-caret { animation:none; }
  .wh-result, .wh-count, .wh-ghost { opacity:1 !important; transform:none !important; }
  .wh-hint { opacity:0 !important; }
}
