/*
 * LIPS Security landing page styles.
 *
 * Grid: every block's height and top edge sits on a 4px grid (checked by _work/grid.js).
 * Media boxes therefore get fixed px heights per breakpoint instead of aspect-ratio.
 *
 * Breakpoints (max-width): 1100 tablet · 900 small tablet · 767 phone, plus 480–767 for large phones.
 * Each component keeps its own @media blocks directly after its base rules, widest first.
 * js/main.js repeats the 767 value for the swipe gallery.
 */

/* ---------- tokens (DESIGN.md §2) ---------- */
:root{
  --ink:#202632;
  --ink-2:#464E5D;
  --sub:#606876;
  --line:#E4E6EA;
  --field:#8B919C;
  --surface:#F7F7F9;
  --white:#FFFFFF;
  --brand:#1111ED;
  --brand-ink:#000FB5;
  --danger:#C62828;
}

/* ---------- base ---------- */
*{box-sizing:border-box}
html{word-break:keep-all;overflow-wrap:break-word;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--white);color:var(--ink);font-family:"Pretendard Variable",Pretendard,sans-serif;font-size:18px;line-height:32px;font-weight:400}
h1,h2,h3{margin:0;font-weight:700;text-wrap:balance}
p,li,dd,figcaption{text-wrap:pretty}
p{margin:0}
ul,ol{margin:0;padding:0;list-style:none}
dl,dd{margin:0}
figure{margin:0}
img,video{display:block}
a{color:var(--brand-ink);text-underline-offset:4px;transition:color 160ms ease-out}
a:hover{color:var(--brand)}
:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
/* Sections that receive focus after an in-page jump (js/main.js) get no ring. */
[tabindex="-1"]:focus{outline:0}
/* Keeps a phrase on one line; the Korean copy marks its own break points with this.
   inline-block so its box is one line-height tall (a 4px multiple) instead of the font's content area. */
.keep{display:inline-block;white-space:nowrap}
.num{font-variant-numeric:tabular-nums}

@media (max-width:767px){
  body{font-size:16px;line-height:28px}
}

/* Standalone text links (sources, mail, homepage) are short; on touch layouts an invisible box enlarges the tap area. */
@media (max-width:1100px){
  .src,.foot-info a{position:relative}
  .src::after,.foot-info a::after{content:"";position:absolute;inset:-10px -4px}
}

/* ---------- layout ---------- */
.wrap{box-sizing:content-box;max-width:1200px;margin:0 auto;padding:0 40px}
section{padding:160px 0}
.alt{background:var(--surface)}
h2{font-size:40px;line-height:52px;letter-spacing:-1px}
h3{font-size:20px;line-height:32px}
.intro{max-width:720px;margin-top:20px;font-size:20px;line-height:36px;color:var(--ink-2)}
.note{margin-top:24px;font-size:14px;line-height:24px;color:var(--sub)}
figcaption{margin-top:16px;font-size:16px;line-height:28px;color:var(--ink-2)}
figcaption b{display:block;color:var(--ink);font-size:18px;line-height:32px}
/* Screenshot or photo in a rounded frame; the 1px outline sits inside so it adds no height. */
.shot{width:100%;object-fit:cover;object-position:top;border-radius:20px;outline:1px solid var(--line);outline-offset:-1px;background:var(--white)}

@media (max-width:1100px){
  section{padding:120px 0}
}
@media (max-width:767px){
  .wrap{padding:0 max(20px,env(safe-area-inset-left))}
  section{padding:80px 0}
  h2{font-size:28px;line-height:40px;letter-spacing:0}
  .intro{font-size:18px;line-height:32px}
}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;height:52px;padding:0 28px;border:0;border-radius:4px;background:var(--brand);color:var(--white);font:inherit;font-size:18px;line-height:24px;font-weight:700;text-decoration:none;cursor:pointer;transition:background-color 160ms ease-out}
.btn:hover{background:var(--brand-ink);color:var(--white)}

/* ---------- header ---------- */
.top{background:var(--white);box-shadow:inset 0 -1px 0 var(--line)}
.top .wrap{display:flex;align-items:center;gap:40px;height:76px}
.top .logo{display:block;flex:none}
.top .logo img{height:28px;width:182px}
.top nav{display:flex;gap:28px;margin-left:auto;font-size:16px;line-height:28px}
.top nav a{color:var(--ink-2);text-decoration:none}
.top nav a:hover{color:var(--brand-ink)}
.top .btn{height:44px;padding:0 20px;font-size:16px}

/* The page is long below desktop width, so the header (and its contact button) stays on screen. */
@media (max-width:1100px){
  .top{position:sticky;top:0;z-index:10}
}
@media (max-width:900px){
  .top nav{display:none}
  .top .btn{margin-left:auto}
}
@media (max-width:767px){
  .top .wrap{height:72px}
  .top .btn{height:48px}
  .top .logo img{height:24px;width:156px}
}

/* ---------- hero ---------- */
.hero{padding:96px 0 120px}
.hero .eyebrow{margin-bottom:16px;font-size:18px;line-height:32px;font-weight:700;color:var(--brand-ink)}
.hero h1{font-size:60px;line-height:72px;letter-spacing:-2px}
.hero .lead{margin-top:28px;font-size:22px;line-height:36px;color:var(--ink-2)}
.hero .act{display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;margin-top:40px}
.hero .act p{font-size:16px;line-height:28px;color:var(--sub)}
.demo{position:relative;margin-top:72px}
/* Heights follow the 16:9 video at each column width, rounded to the 4px grid. */
.demo video{width:100%;height:676px;object-fit:contain;border-radius:24px;outline:1px solid var(--line);outline-offset:-1px;background:var(--white)}
/* Centered play button shown until playback starts (js/main.js initDemoVideos). */
.play{position:absolute;top:50%;left:50%;display:grid;place-items:center;width:84px;height:84px;margin:-42px 0 0 -42px;padding:0;border:0;border-radius:50%;background:var(--brand);color:var(--white);cursor:pointer;transition:background-color 160ms ease-out}
.play:hover{background:var(--brand-ink)}
.play[hidden]{display:none}
.play svg{width:36px;height:36px}

@media (max-width:1100px){
  .demo video{height:532px}
}
@media (max-width:900px){
  .hero h1{font-size:48px;line-height:60px;letter-spacing:-1px}
  .demo video{height:396px}
}
@media (max-width:767px){
  .hero{padding:48px 0 80px}
  .hero h1{font-size:36px;line-height:48px;letter-spacing:-1px}
  .hero .lead{margin-top:20px;font-size:18px;line-height:32px}
  .hero .act{margin-top:32px}
  .demo{margin-top:48px}
  .demo video{height:200px;border-radius:20px}
  .play{width:48px;height:48px;margin:-24px 0 0 -24px}
  .play svg{width:24px;height:24px}
}
@media (min-width:480px) and (max-width:767px){
  .demo video{height:320px}
}

/* ---------- why: regulations ---------- */
.rules{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:56px}
.rules .shot{height:240px}
.rules .shot{object-position:center}
.rules h3{margin-top:20px}
.rules li > p{margin-top:4px;color:var(--ink-2)}
.rules .src{display:block;width:max-content;margin-top:8px;font-size:14px;line-height:24px}

/* Tablet: photo on the left, text on the right. */
@media (max-width:1100px){
  .rules{grid-template-columns:1fr}
  .rules li{display:grid;grid-template-columns:280px 1fr;grid-template-rows:auto auto 1fr;column-gap:24px;align-items:start}
  .rules .shot{grid-row:1 / span 3;height:200px}
  .rules h3{margin-top:0}
}
/* Phone: the photo shrinks to a 4:3 thumbnail. */
@media (max-width:767px){
  .rules{gap:32px;margin-top:40px}
  .rules li{grid-template-columns:128px 1fr;column-gap:16px}
  .rules .shot{height:96px}
}

/* ---------- how: steps and reasons ---------- */
.steps{display:grid;grid-template-columns:5fr 9fr 9fr;gap:24px;margin-top:56px}
.steps img{width:100%;height:360px;object-fit:contain;border-radius:20px;background:var(--white);outline:1px solid var(--line);outline-offset:-1px}
.steps h3{margin-top:20px}
.steps p{margin-top:4px;color:var(--ink-2)}
.steps img.popup-bg{background:var(--surface)}
.steps-note{margin-top:24px}
/* Door demo video (on hold, commented out in index.html): same column width as the hero video, so it takes the .demo video heights. */
.demo.door{margin-top:56px}
.reasons{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;margin-top:80px}
.reasons li{padding-top:20px;box-shadow:inset 0 2px 0 var(--ink)}
.reasons p{margin-top:8px;font-size:16px;line-height:28px;color:var(--ink-2)}

/* Tablet: step 1 (a tall phone screen) spans the row beside its text; steps 2 and 3 share the next row. */
@media (max-width:1100px){
  .steps{grid-template-columns:1fr 1fr}
  .steps li:first-child{grid-column:1 / -1;display:grid;grid-template-columns:280px 1fr;grid-template-rows:auto 1fr;column-gap:24px;align-items:start}
  .steps li:first-child img{grid-row:1 / span 2;height:400px}
  .steps li:first-child h3{margin-top:0}
  .steps img{height:280px}
  .reasons{grid-template-columns:1fr 1fr;row-gap:40px}
}
@media (max-width:767px){
  .steps{grid-template-columns:1fr;gap:40px;margin-top:40px}
  .steps li:first-child{display:block}
  .steps li:first-child img{height:400px}
  .steps li:first-child h3{margin-top:20px}
  .steps img{height:220px}
  /* The step 2 popup carries small text; 320 keeps it readable. */
  .steps img.popup-bg{height:320px}
  .demo.door{margin-top:40px}
  .reasons{grid-template-columns:1fr;gap:28px;margin-top:56px}
}

/* ---------- uses: gallery ---------- */
.gallery{display:grid;grid-template-columns:1fr 1fr;gap:56px 24px;margin-top:56px}
/* Every picture is shown whole at 16:10 (the demo-video scenes are cut to exactly 16:10).
   The box height is the 16:10 height rounded down to the 4px grid, so at most 3px of a picture is ever trimmed. */
.gallery figure{container-type:inline-size}
.gallery .shot{height:auto;aspect-ratio:16 / 10}
.gallery .shot{object-position:center}
@supports (height:round(down,10px,4px)){
  .gallery .shot{aspect-ratio:auto;height:round(down,62.5cqw,4px)}
}

/* Phone: a horizontal swipe row that bleeds to the screen edges, with the next card peeking in.
   js/main.js makes it a focusable region at this width so keyboards can scroll it. */
@media (max-width:767px){
  .gallery{display:flex;gap:16px;margin:40px calc(-1 * max(20px,env(safe-area-inset-left))) 0;padding:0 max(20px,env(safe-area-inset-left));overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 max(20px,env(safe-area-inset-left));overscroll-behavior-x:contain;scrollbar-width:none}
  .gallery::-webkit-scrollbar{display:none}
  .gallery figure{flex:0 0 300px;scroll-snap-align:start}
}
@media (min-width:480px) and (max-width:767px){
  .gallery figure{flex-basis:360px}
}

/* ---------- plans: cards and product details ---------- */
.plans{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:56px}
.plans li{display:flex;flex-direction:column;border-radius:20px;background:var(--white);outline:1px solid var(--line);outline-offset:-1px;overflow:hidden}
.plans li{container-type:inline-size}
/* Card pictures follow the card width at 16:10, rounded down to the 4px grid, so the bank screen is never cut. */
.plans .shot{height:240px;border-radius:0;outline:0;object-position:center 40%}
@supports (height:round(down,10px,4px)){
  .plans .shot{height:round(down,62.5cqw,4px)}
}
.plans .body{padding:24px 24px 28px}
.plans h3{font-size:22px;line-height:32px}
.plans .lede{margin-top:4px;color:var(--ink-2)}
.plans dl{margin-top:20px}
.plans dl div{padding:12px 0;box-shadow:inset 0 1px 0 var(--line)}
.plans dt{font-size:14px;line-height:24px;color:var(--sub)}
.plans dd{font-size:16px;line-height:28px;color:var(--ink-2)}
/* Third card's picture: "existing face auth + lips auth" drawn as two boxes. */
.addon{display:flex;align-items:center;justify-content:center;gap:12px;height:240px;background:var(--surface);font-size:18px;line-height:32px}
.addon span{padding:12px 20px;white-space:nowrap;border-radius:4px;background:var(--white);box-shadow:inset 0 0 0 1px var(--line);text-align:center;color:var(--ink-2)}
.addon .plus{box-shadow:inset 0 0 0 2px var(--brand);color:var(--ink);font-weight:700}
.addon i{font-style:normal;font-size:32px;line-height:32px;font-weight:700;color:var(--brand)}
.forms{margin-top:56px;max-width:792px}
.forms div{display:grid;grid-template-columns:120px 1fr;gap:0 24px;padding:16px 0;box-shadow:inset 0 1px 0 var(--line)}
.forms dt{font-weight:700}
.forms dd{color:var(--ink-2)}

@media (max-width:1100px){
  .plans{grid-template-columns:1fr 1fr}
  .plans li:last-child{grid-column:1 / -1}
}
@media (max-width:767px){
  .plans{grid-template-columns:1fr;margin-top:40px}
  .addon{height:200px}
  .forms div{grid-template-columns:1fr}
}

/* ---------- security: data flow ---------- */
.flow{display:grid;grid-template-columns:repeat(4,1fr);gap:40px;margin-top:56px}
.flow li{position:relative;padding:24px;border-radius:20px;background:var(--white);outline:1px solid var(--line);outline-offset:-1px}
/* Arrow centered in the 40px gap to the next box. */
.flow li:not(:last-child)::after{content:"→";position:absolute;top:50%;margin-top:-16px;right:-32px;font-size:20px;line-height:32px;color:var(--sub)}
.flow small{display:block;font-size:14px;line-height:24px;color:var(--sub)}
.flow h3{margin-top:4px}
.flow p{margin-top:8px;font-size:16px;line-height:28px;color:var(--ink-2)}
.flow li:last-child{background:var(--ink);outline:0;color:var(--white)}
.flow li:last-child small,.flow li:last-child p{color:var(--line)}
.points{max-width:792px;margin-top:56px}
.points li{padding:20px 0;box-shadow:inset 0 -1px 0 var(--line)}

/* Tablet: 2 × 2, so the arrow after the second box (end of a row) goes. */
@media (max-width:1100px){
  .flow{grid-template-columns:1fr 1fr}
  .flow li:nth-child(2)::after{content:none}
}
/* Phone: one column, arrows point down into the 40px gap below each box. */
@media (max-width:767px){
  .flow{grid-template-columns:1fr;gap:40px;margin-top:40px}
  .flow li:not(:last-child)::after{content:"↓";top:auto;margin-top:0;right:auto;bottom:-36px;left:50%;width:20px;margin-left:-10px;text-align:center}
  .flow li:nth-child(2)::after{content:"↓"}
  .points{margin-top:40px}
}

/* ---------- proof: awards and patents ---------- */
.proof{display:grid;grid-template-columns:1fr 1fr;gap:64px;margin-top:56px;align-items:start}
.awards{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.awards img{height:112px;width:auto;border-radius:4px}
/* Award names wrap at phone widths; pretty keeps the breaks the owner reviewed (headings default to balance). */
.awards h3{margin-top:20px;font-size:18px;text-wrap:pretty}
/* Awards 3 and 4 have no badge image, so their title starts at the top. */
.awards li:nth-child(n+3) h3{margin-top:0}
.awards p{margin-top:4px;font-size:16px;line-height:28px;color:var(--ink-2)}
.patents ol{margin-top:12px}
.patents li{padding:16px 0;box-shadow:inset 0 -1px 0 var(--line)}
.patents li b{display:block;font-size:16px;line-height:28px}
.patents li span.num{display:block;font-size:14px;line-height:24px;color:var(--sub)}

@media (max-width:1100px){
  .proof{grid-template-columns:1fr;gap:48px}
}
@media (max-width:767px){
  .proof{margin-top:40px}
  .awards{gap:16px}
  .awards img{height:80px}
}

/* ---------- contact ---------- */
.contact .wrap{display:grid;grid-template-columns:4fr 7fr;gap:64px;align-items:start}
.contact .intro{font-size:18px;line-height:32px}
.contact form{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:40px;border-radius:20px;background:var(--white)}
.field{display:flex;flex-direction:column}
.field.full{grid-column:1 / -1}
label,.legend{font-size:16px;line-height:28px;font-weight:700;margin-bottom:8px}
.req{display:inline-block;color:var(--brand-ink);font-weight:400}
input[type=text],input[type=email],input[type=tel],select,textarea{height:52px;padding:0 16px;border:0;border-radius:4px;background:var(--white);box-shadow:inset 0 0 0 1px var(--field);color:var(--ink);font:inherit;font-size:16px;line-height:24px;transition:box-shadow 160ms ease-out}
input[type=text]:hover,input[type=email]:hover,input[type=tel]:hover,select:hover,textarea:hover{box-shadow:inset 0 0 0 1px var(--ink-2)}
/* Native arrow removed so every browser shows the same chevron. */
select{-webkit-appearance:none;appearance:none;padding-right:48px;background:var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23464E5D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;cursor:pointer}
textarea{height:160px;padding:12px 16px;resize:vertical}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--ink);outline-offset:0}
/* A required field left empty or malformed: red frame plus its own message right under it (js/main.js). */
input[aria-invalid="true"],input[aria-invalid="true"]:hover{box-shadow:inset 0 0 0 2px var(--danger)}
.err{margin-top:8px;font-size:14px;line-height:24px;color:var(--danger);white-space:pre-line}
.err[hidden]{display:none}
fieldset{margin:0;padding:0;border:0;grid-column:1 / -1}
legend{padding:0}
/* Radio choices drawn as bordered tiles; the whole tile is the label. */
.choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.choices label{display:flex;align-items:center;gap:12px;height:52px;margin:0;padding:0 16px;border-radius:4px;background:var(--white);box-shadow:inset 0 0 0 1px var(--field);font-weight:400;cursor:pointer;transition:box-shadow 160ms ease-out}
.choices label:hover{box-shadow:inset 0 0 0 1px var(--ink-2)}
.choices label:has(input:checked){box-shadow:inset 0 0 0 2px var(--brand);font-weight:700}
.choices input{width:20px;height:20px;margin:0;flex:none;accent-color:var(--brand)}
.choices label:has(input:focus-visible){outline:2px solid var(--ink);outline-offset:2px}
.choices input:focus-visible{outline:0}
.send{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:flex-start;gap:16px 24px;margin-top:8px}
#sent{grid-column:1 / -1;font-size:16px;line-height:28px;color:var(--ink-2)}

@media (max-width:1100px){
  .contact .wrap{grid-template-columns:1fr;gap:40px}
}
@media (max-width:767px){
  .contact form{grid-template-columns:1fr;gap:20px;padding:24px 20px}
  .choices{grid-template-columns:1fr}
}

/* ---------- footer ---------- */
footer{padding:64px 0 48px;background:var(--white);font-size:14px;line-height:24px;color:var(--sub)}
.foot-top{padding-bottom:32px;box-shadow:inset 0 -1px 0 var(--line)}
.foot-top img{height:24px;width:auto}
.foot-info{display:grid;grid-template-columns:auto auto auto 1fr;gap:8px 40px;margin-top:32px}
.foot-info dt{color:var(--sub)}
.foot-info dd{margin-top:4px;color:var(--ink-2)}
.foot-info a{display:inline-block;color:var(--ink-2)}
.copy{margin-top:40px}

@media (max-width:900px){
  .foot-info{grid-template-columns:1fr 1fr;gap:24px 40px}
}
@media (max-width:767px){
  .foot-info{grid-template-columns:1fr;gap:16px}
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion:reduce){
  *{transition:none !important}
}
