/* Line45 site styles. Tokens come from base.css. Ground #000, ink #fff, muted #a3a3a3, one accent (--orange) on two things only. */
:root { --orange: #ef4a1c; --bar-h: 64px; }
html { background: #000; }
body { font-weight: 400; font-size: 17px; line-height: 1.5; min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { text-decoration: none; transition: opacity var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { a:hover:not(.tile):not(.hero__link), button:hover { opacity: 0.6; } }
a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
button { color: inherit; transition: opacity var(--t-hover) ease, color var(--t-hover) ease; }

/* top bar */
.bar { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; padding: 20px var(--margin); font-size: 16px; font-weight: 500; position: relative; z-index: 6; }
.bar__mark { font-weight: 700; font-size: 18px; letter-spacing: -0.03em; justify-self: start; }
.bar__nav { display: flex; gap: 2rem; justify-self: start; margin-left: clamp(2rem, 6vw, 6rem); }
.bar__nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 0.07em; }
.bar__right { justify-self: end; }
.home .bar { position: absolute; inset: 0 0 auto 0; }
@media (max-width: 40em) {
  .bar { grid-template-columns: 1fr auto; row-gap: 10px; padding-top: 16px; }
  .bar__nav { grid-column: 1 / -1; grid-row: 2; gap: 1.5rem; }
}

/* hero. Desktop, tablet, landscape phone: the frame fills the screen (cover). Portrait phone (max 700px): 16:9 frame centred, meta + switcher under it. */
.hero { position: relative; height: 100svh; min-height: 460px; overflow: hidden; background: #000; }
.hero__frame { position: absolute; inset: 0; overflow: hidden; background: #000; }
.hero__under { display: contents; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 400ms linear; pointer-events: none; }
.slide.is-on { opacity: 1; }
.slide img, .slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.slide video { opacity: 0; transition: opacity 400ms linear; }
.slide video.is-playing { opacity: 1; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 16%), linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 32%); pointer-events: none; z-index: 1; } /* taste-skill-ignore: neutral scrim over film */
.hero__link { position: absolute; inset: 0; z-index: 2; display: block; }
.hero__metas { position: absolute; left: var(--margin); bottom: 22px; max-width: 52%; z-index: 3; pointer-events: none; display: grid; }
.hero__meta { grid-area: 1 / 1; text-align: left; opacity: 0; visibility: hidden; transition: opacity 400ms linear, visibility 0s linear 400ms; }
.hero__meta.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.hero__cta { display: flex; align-items: center; width: fit-content; height: 44px; margin-top: 14px; padding: 0 18px; border-radius: 0; background: var(--orange); color: #fff; font-size: 16px; font-weight: 500; line-height: 1; pointer-events: auto; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { a.hero__cta.hero__cta:hover, button.hero__cta.hero__cta:hover { opacity: 0.8; } }
.hero__cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero__close { position: absolute; top: 72px; right: var(--margin); z-index: 6; font-size: 16px; font-weight: 500; }
.hero__close[hidden] { display: none; }
.slide .reel-full { pointer-events: auto; opacity: 1; z-index: 1; object-fit: cover; }
.hero--full .hero__link, .hero--full .hero__progress { display: none; }
.hero--full .hero__scrim { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 16%); } /* taste-skill-ignore: neutral scrim so nav and Close stay legible on bright frames */
.hero--full .hero__metas { opacity: 0; pointer-events: none; }
.hero--full .switcher { bottom: 64px; }
.hero__client { display: block; font-weight: 700; font-size: 30px; line-height: 1.05; letter-spacing: -0.03em; }
.hero__title { display: block; font-size: 16px; line-height: 1.35; margin-top: 4px; }
.switcher { position: absolute; right: var(--margin); bottom: 18px; z-index: 4; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 0.35rem; font-variant-numeric: tabular-nums; max-width: 44%; }
.switcher button { color: rgba(255, 255, 255, 0.45); font-size: 17px; font-weight: 500; min-width: 28px; min-height: 36px; text-align: right; }
.switcher button[aria-current="true"] { color: #fff; }
.hero__progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); z-index: 5; }
@media (max-width: 700px) and (orientation: portrait) {
  .hero { display: grid; grid-template-rows: 1fr auto 1fr; min-height: 0; }
  .hero__frame { position: relative; inset: auto; grid-row: 2; aspect-ratio: 16 / 9; width: 100%; }
  .hero__scrim { display: none; }
  .hero__under { display: block; grid-row: 3; padding: 14px var(--margin) 0; }
  .hero__metas { position: static; max-width: none; }
  .hero__client { font-size: 22px; }
  .hero--full .switcher { bottom: auto; }
  .slide .reel-full { object-fit: contain; }
  .switcher { position: static; display: flex; flex-wrap: nowrap; justify-content: flex-start; max-width: none; gap: 0; margin-top: 10px; margin-left: 0; }
  .switcher button { min-width: 31px; min-height: 44px; text-align: left; font-size: 17px; padding: 0; }
  .bar__nav { margin-left: 0; }
}
@media (max-width: 40em) and (orientation: landscape) { .bar__nav { margin-left: 0; } }
@media (max-width: 40em) { .hero__close { top: 100px; } }

/* page frame */
.page { padding-inline: var(--margin); }

/* work */
.filters { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; padding-block: clamp(2.5rem, 7vw, 6rem) 1.25rem; font-size: 16px; font-weight: 500; }
.filters a { color: #fff; }
.filters a.is-active { color: var(--orange); }
.grid-work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 3rem; }
@media (max-width: 44em) { .grid-work { grid-template-columns: 1fr; } }
.tile { display: block; }
.tile[hidden] { display: none; }
.tile__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.tile__media img, .tile__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.tile__media video { opacity: 0; }
.tile__media video.is-playing { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .tile:hover .tile__media img, .tile:hover .tile__media video { transform: scale(1.02); } }
.tile__cap { padding: 12px 0 22px; font-size: 16px; line-height: 1.4; }
.tile__client { display: block; font-weight: 700; }
.tile__sub { display: block; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { transition-delay: calc(var(--i, 0) * 70ms); }
}

/* film page */
.player { background: #000; }
.player video { width: 100%; aspect-ratio: 16 / 9; max-height: calc(100svh - 56px); background: #000; object-fit: contain; }
.film { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); padding-block: clamp(2rem, 5vw, 4.5rem); }
.film__client { font-size: clamp(2.5rem, 7vw, 7rem); line-height: 1; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.film__list { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 2.25rem; align-content: start; font-size: 17px; }
.film__list dt { color: var(--muted); }
.film__list dd { margin: 0; }
@media (max-width: 44em) { .film { grid-template-columns: 1fr; gap: 1.75rem; } .film__client { font-size: clamp(2.25rem, 12vw, 4rem); } }
.next { display: block; padding: 1rem var(--margin) clamp(3rem, 8vw, 6rem); }
.next__label { display: block; color: var(--muted); font-size: 16px; }
.next__name { display: block; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin-top: 4px; }

/* about */
.about { padding-block: clamp(3rem, 8vw, 7rem) 3rem; }
.about__body { font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem); line-height: 1.25; letter-spacing: -0.02em; max-width: 36ch; font-weight: 500; }
.about__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(2.5rem, 6vw, 5rem); font-size: 17px; }
@media (max-width: 44em) { .about__facts { grid-template-columns: 1fr; gap: 0.25rem; } }
.about__logo { width: clamp(96px, 12vw, 168px); height: auto; margin-top: clamp(2.5rem, 6vw, 5rem); }
.photos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 22vw; gap: 12px; padding-bottom: 4rem; }
.photos figure { margin: 0; overflow: hidden; background: var(--surface); min-height: 0; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos figure:nth-child(8n+1) { grid-column: span 8; grid-row: span 2; }
.photos figure:nth-child(8n+2) { grid-column: span 4; }
.photos figure:nth-child(8n+3) { grid-column: span 4; }
.photos figure:nth-child(8n+4) { grid-column: span 4; }
.photos figure:nth-child(8n+5) { grid-column: span 5; }
.photos figure:nth-child(8n+6) { grid-column: span 3; }
.photos figure:nth-child(8n+7) { grid-column: span 7; }
.photos figure:nth-child(8n+8) { grid-column: span 5; }
@media (max-width: 44em) { .photos { grid-auto-rows: auto; } .photos figure:nth-child(n) { grid-column: span 12; grid-row: auto; aspect-ratio: 4 / 3; } .photos figure:nth-child(3n+2), .photos figure:nth-child(3n+3) { grid-column: span 6; aspect-ratio: 1; } }

/* contact */
.contact { padding-block: clamp(3rem, 8vw, 7rem) 3rem; }
.contact__mail { font-size: 7vw; line-height: 1; letter-spacing: -0.03em; font-weight: 700; overflow-wrap: anywhere; }
.contact__mail a { display: inline-block; }
@media (max-width: 44em) { .contact__mail { font-size: 8.4vw; } }
.contact__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem var(--gutter); margin-top: clamp(3rem, 8vw, 7rem); font-size: 17px; }
@media (max-width: 44em) { .contact__grid { grid-template-columns: 1fr; } }
.contact__grid p + p { margin-top: 0.25rem; }
.contact__phone { font-size: clamp(1.5rem, 1rem + 1.4vw, 2rem); letter-spacing: -0.02em; font-weight: 500; }
.contact__links { display: flex; gap: 1.5rem; margin-top: 0.75rem; }
.contact__links a.zalo { color: var(--orange); }

/* footer */
.foot { padding: clamp(3rem, 8vw, 7rem) var(--margin) 1.5rem; margin-top: auto; }
.foot__mark { font-weight: 700; font-size: 29.8vw; line-height: 0.78; letter-spacing: -0.045em; white-space: nowrap; margin-left: -0.05em; user-select: none; }
.foot__line { margin-top: 1.25rem; font-size: 16px; line-height: 1.45; max-width: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .foot__mark { opacity: 0; animation: l45-fade 1200ms var(--ease-soft) 200ms forwards; }
}
@keyframes l45-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .slide, .slide video, .hero__meta { transition: none; } .tile__media img, .tile__media video { transition: none; } }
.grid-work, .about__facts { list-style: none; padding-left: 0; }
.grid-work { margin-block: 0; }

/* footer wordmark: dim, with a soft circle of light that follows the cursor (effect requested by Dai; the one allowed gradient besides the hero scrim) */
@property --wm-r { syntax: '<length>'; inherits: false; initial-value: 0px; }
.foot__mark { --wm-ghost: rgba(255,255,255,0.15); --wm-lit: rgba(255,255,255,0.95); container-type: inline-size; }
.foot__mark .mark { color: var(--wm-ghost); display: block; white-space: nowrap; cursor: default; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) { /* taste-skill-ignore */
  .foot__mark .mark { background-image: radial-gradient(circle var(--wm-r) at var(--wm-x, 50%) var(--wm-y, 50%), var(--wm-lit), transparent), linear-gradient(var(--wm-ghost), var(--wm-ghost)); color: transparent; -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-clip: text; transition: --wm-r 420ms cubic-bezier(0.16, 1, 0.3, 1); } /* taste-skill-ignore: footer light effect requested by Dai */
  .foot__mark .mark.is-active { --wm-r: 17cqw; }
}
@media (prefers-reduced-motion: reduce) { .foot__mark .mark { transition: none; } }

/* v3: Vimeo embeds and boxed (portrait/square) films */
.player--embed { aspect-ratio: 16 / 9; max-height: calc(100svh - 56px); }
.player--embed iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 0; background: #000; }
.player--boxed video { object-fit: contain; }
@media (max-width: 44em) { .player--boxed video { aspect-ratio: 4 / 5; max-height: none; } .player--square video { aspect-ratio: 1 / 1; } }
