/* ==========================================================================
   Kelvin Film Lab — shared design system (public site)
   Ported from the approved "light hybrid" homepage prototype:
   light/editorial sections with a dark cinematic hero, red accent, large
   type. Kept close to the prototype's own class names on purpose so future
   visual tweaks can be cross-checked against it.
   ========================================================================== */

:root {
  --bg: #f6f4ef;
  --bg-2: #efede7;
  --panel: #ebe8e1;
  --line: #d3d0c9;
  --text: #111111;
  --muted: #716e68;
  --red: #df2525;
  --dark: #0a0a0a;
  --dark-2: #111111;
  --dark-line: #2a2a2a;
  --dark-text: #f4f1eb;
  --dark-muted: #9b9b9b;
  --max: 1480px;
  --pad: clamp(18px, 3.3vw, 52px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: #1a63d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans", "Noto Sans Armenian", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}
@media (max-width: 480px) { body { font-size: 16px; } }
small, .small-text { font-size: 13px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.container { width: min(calc(100% - 2 * var(--pad)), var(--max)); margin: auto; }

/* Film-grain overlay from the prototype: purely decorative, non-interactive,
   and static (nothing to disable for prefers-reduced-motion). Inline data URI
   so no extra network request and no external asset. */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .022; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 10px; top: -60px; background: var(--dark); color: #fff;
  padding: 10px 16px; border-radius: 6px; z-index: 1000; transition: top .2s var(--ease);
}
.skip-link:focus { top: 10px; }

.eyebrow { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; background: var(--red); border-radius: 50%; margin-right: 9px; vertical-align: 1px; }
/* --muted is chosen for the light sections. Over the dark hero it lands at
   3.9:1, under the 4.5:1 a 13px label needs, which is exactly the sort of
   thing that reads as "fine" to someone who already knows what it says. */
.hero .eyebrow, .page-hero .eyebrow { color: #bdbab4; }
.section-title {
  font-size: clamp(42px, 6vw, 96px); font-weight: 700; letter-spacing: -.055em;
  line-height: .9; margin: 16px 0 0; overflow-wrap: break-word;
}
.rule { height: 1px; background: var(--line); }

.btn {
  display: inline-flex; align-items: center; gap: 14px; border: 1px solid #aaa59c;
  padding: 13px 22px; border-radius: 999px; font-size: 15px; letter-spacing: .04em;
  text-transform: uppercase; transition: .25s var(--ease); color: var(--text); background: transparent;
  cursor: pointer; min-height: 44px;
}
.btn:hover, .btn:focus-visible { border-color: #111; background: #111; color: #fff; }
.btn.red, .btn.red:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.arrow { font-size: 16px; transform: translateY(-1px); }

/* ---- Header ---- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(to bottom, rgba(0,0,0,.74), rgba(0,0,0,0));
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
header.is-light, header.scrolled {
  background: rgba(246,244,239,.94); box-shadow: 0 1px 0 rgba(0,0,0,.08);
  backdrop-filter: blur(15px) saturate(120%);
}
nav.primary-nav { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
@media (max-width: 900px) { nav.primary-nav { height: 68px; } }
.brand { display: flex; align-items: center; gap: 10px; }
/* Two official colour variants ship as separate files; CSS reveals the one
   that suits the background behind the header. The old approach filtered the
   single light asset with brightness(0) invert(1), which turned every opaque
   pixel white — badge and the white "k" inside it alike — so the "k" vanished
   on the dark hero. See _BrandMark.cshtml and docs/ARCHITECTURE.md. */
.brand-logo { display: inline-flex; height: 28px; }
.brand-logo-img { height: 100%; width: auto; display: block; }
/* The header sits on the dark hero until it turns light on scroll. */
.brand-logo-on-light { display: none; }
.brand-logo-on-dark { display: block; }
header.is-light .brand-logo-on-light,
header.scrolled .brand-logo-on-light { display: block; }
header.is-light .brand-logo-on-dark,
header.scrolled .brand-logo-on-dark { display: none; }

.navlinks { display: flex; align-items: center; gap: 25px; font-size: 13px; letter-spacing: .11em; text-transform: uppercase; color: #d7d7d7; }
header.is-light .navlinks, header.scrolled .navlinks { color: #111; }
.navlinks a { opacity: .82; transition: .2s; padding: 6px 2px; }
.navlinks a:hover, .navlinks a:focus-visible, .navlinks a[aria-current="page"] { opacity: 1; }
.lang-switch { display: flex; gap: 6px; font-size: 13px; letter-spacing: .08em; }
.lang-switch a { opacity: .55; color: inherit; }
.lang-switch a:hover, .lang-switch a:focus-visible { opacity: .85; }
.lang-switch span[aria-current="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; min-height: 44px; padding: 0 4px; }
header.is-light .menu-btn, header.scrolled .menu-btn { color: #111; }

/* ---- Hero ---- */
.hero { min-height: 100svh; display: flex; align-items: flex-end; position: relative; overflow: hidden; padding-top: 82px; background: var(--dark); color: var(--dark-text); }
.hero-media {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 73% 34%, rgba(223,37,37,.22), transparent 22%),
    linear-gradient(120deg, rgba(0,0,0,.92) 7%, rgba(0,0,0,.30) 52%, rgba(0,0,0,.80) 100%),
    linear-gradient(155deg, #171717 0%, #262626 35%, #0a0a0a 65%, #1a1a1a 100%);
}
.hero-media::before {
  content: ""; position: absolute; width: 44vw; height: 58vw; right: 4vw; top: 2vh;
  border: 1px solid rgba(255,255,255,.14); transform: rotate(8deg);
  background: linear-gradient(135deg,#262626,#111 48%,#282828); box-shadow: 0 40px 120px #000;
}
.hero-content { position: relative; z-index: 2; width: 100%; padding: 0 0 clamp(42px,6vh,78px); }
.hero-grid { display: grid; grid-template-columns: 1.45fr .55fr; align-items: end; gap: 30px; }
.hero h1 {
  font-size: clamp(56px, 10vw, 164px); font-weight: 750; letter-spacing: -.07em;
  line-height: .78; margin: 0; text-transform: uppercase; overflow-wrap: break-word;
}
.hero-sub { max-width: 530px; margin-top: 26px; font-size: clamp(16px,1.45vw,21px); line-height: 1.45; color: #c8c8c8; }
.hero-meta { display: flex; gap: 30px; margin-top: 28px; font-size: 13px; letter-spacing: .15em; text-transform: uppercase; color: #9b9b9b; flex-wrap: wrap; }
.hero-right { justify-self: end; max-width: 315px; }
.hero-right .label { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: #9a9a9a; }
.hero-right p { font-size: 16px; line-height: 1.5; color: #d1d1d1; margin: 10px 0 20px; }

/* ---- Page hero (non-home pages) ---- */
.page-hero { background: var(--dark); color: var(--dark-text); padding: clamp(140px,20vw,200px) 0 clamp(50px,8vw,80px); }
.page-hero .section-title { color: var(--dark-text); }
.page-hero p { color: #c8c8c8; max-width: 620px; margin-top: 18px; font-size: clamp(16px,1.6vw,19px); line-height: 1.55; }
/* The page hero is a dark section, so the light-theme button colors would put
   near-black text on a near-black background. Invert them here. */
.page-hero .btn { border-color: #4a4a4a; color: var(--dark-text); background: transparent; }
.page-hero .btn:hover, .page-hero .btn:focus-visible { border-color: #fff; background: #fff; color: #111; }
.page-hero .btn.red, .page-hero .btn.red:hover, .page-hero .btn.red:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }

/* ---- Sections ---- */
section { padding: clamp(78px,10vw,150px) 0; }
/* The first light section after the dark hero gets extra breathing room,
   exactly as in the prototype. */
#work { padding-top: clamp(92px,11vw,165px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 44px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid #c8c4bb; border-radius: 999px; padding: 10px 14px; font-size: 13px;
  letter-spacing: .03em; color: #716e68; background: rgba(255,255,255,.4); cursor: pointer; min-height: 44px;
}
.chip[aria-pressed="true"],
.chip[aria-current="page"],
.chip[aria-current="true"] { border-color: var(--red); background: var(--red); color: #fff; }
/* Non-interactive tag (e.g. a project's service categories): same pill shape,
   but never announced or styled as a control. */
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 0; padding: 0; list-style: none; }
.tag { border: 1px solid #c8c4bb; border-radius: 999px; padding: 8px 14px; font-size: 13px; color: #716e68; background: rgba(255,255,255,.4); }

.work-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 16px; }
.project { position: relative; overflow: hidden; background: #151515; min-height: 320px; box-shadow: 0 0 0 1px rgba(0,0,0,.055); border-radius: 2px; }
.project.large { grid-column: span 12; min-height: min(63vw,780px); }
.project.half { grid-column: span 6; min-height: min(42vw,590px); }
.project .image { position: absolute; inset: 0; z-index: 1; transition: .6s var(--ease); background-size: cover; background-position: center; }
.project .image img { width: 100%; height: 100%; object-fit: cover; }
.project .image.is-placeholder { background: linear-gradient(135deg,#242424 0%,#141414 52%,#3a2323 100%); display: flex; align-items: center; justify-content: center; }
.project .image.is-placeholder span { font-size: 13px; letter-spacing: .2em; color: #a5a5a5; opacity: .75; text-transform: uppercase; }
.project:hover .image, .project:focus-within .image { transform: scale(1.02); }
.project-info { position: absolute; inset: auto 0 0; z-index: 2; pointer-events: none; padding: 24px; background: linear-gradient(to top, rgba(0,0,0,.86), transparent); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; color: #fff; }
.project-title { font-size: clamp(23px,3vw,48px); font-weight: 650; letter-spacing: -.04em; }
.project-meta { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #bcbcbc; margin-top: 8px; }
.project-index { font-size: 13px; letter-spacing: .2em; color: #a0a0a0; white-space: nowrap; }
/* Whole-card link. It is first in the DOM (so screen readers meet the card's
   name before its decoration), which without an explicit stacking order would
   leave it painted *under* .image and .project-info — making the card
   unclickable with a mouse. */
.project-link { position: absolute; inset: 0; z-index: 3; }
.project-link .visually-hidden { position: absolute; }

@media (max-width: 900px) {
  .project.large, .project.half { grid-column: span 12; min-height: 62vh; }
}

/* ---- Statement ---- */
.statement { padding-top: clamp(20px,3vw,44px); }
.statement-wrap { display: grid; grid-template-columns: 3fr 2fr; gap: 6vw; align-items: end; }
.statement h2 { font-size: clamp(46px,8vw,126px); line-height: .86; letter-spacing: -.065em; margin: 0; font-weight: 700; overflow-wrap: break-word; }
.statement p { font-size: clamp(18px,2vw,28px); line-height: 1.35; color: #595650; max-width: 500px; }
.accent { color: var(--red); }
@media (max-width: 900px) { .statement-wrap { grid-template-columns: 1fr; } .statement p { margin-top: 22px; } }

/* ---- Services ---- */
.services { border-top: 1px solid var(--line); }
.service-row { display: grid; grid-template-columns: 90px 1fr minmax(220px,450px) 40px; gap: 25px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: center; transition: .25s var(--ease); }
.service-row:hover, .service-row:focus-visible { background: #efede7; padding-left: 10px; }
.service-no { font-size: 13px; color: #8a867f; letter-spacing: .18em; }
.service-name { font-size: clamp(28px,4.2vw,62px); font-weight: 600; letter-spacing: -.045em; overflow-wrap: break-word; }
.service-copy { font-size: 14px; color: #706c65; line-height: 1.5; }
.service-plus { font-size: 22px; color: #8a867f; }
@media (max-width: 900px) { .service-row { grid-template-columns: 42px 1fr 28px; gap: 16px; } .service-copy { display: none; } }

/* ---- Article / journal ---- */
.journal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 40px; }
.article { border-top: 1px solid #bbb6ad; padding-top: 18px; min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; }
.article h4 { font-size: clamp(22px,2.4vw,36px); letter-spacing: -.035em; line-height: 1.08; margin: 12px 0 0; }
.article-meta { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #7c776f; }
@media (max-width: 900px) { .journal-grid { grid-template-columns: 1fr; } }

/* ---- Long-form content (project / service / article bodies) ---- */
.prose { max-width: 760px; }
.prose p { font-size: 18px; line-height: 1.6; color: #3d3a35; margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose.lead p { font-size: clamp(18px,1.8vw,24px); line-height: 1.5; margin: 0 0 20px; }
.container-narrow { max-width: 820px; }
.detail-grid { align-items: start; }
.detail-aside p { font-size: 16px; line-height: 1.6; color: #595650; margin-top: 10px; }
.detail-media { margin-bottom: 40px; }
.embed-16x9 { aspect-ratio: 16 / 9; background: #111; width: 100%; margin-bottom: 40px; }
.embed-16x9 iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-16x9 video { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; }

/* A project's stills. Two columns from tablet up, one on a phone - which is
   what the "sizes" attribute on each picture promises the browser, so the two
   have to be changed together. */
.project-gallery {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.project-gallery li { margin: 0; }
.project-gallery img {
  width: 100%; height: auto; display: block; background: #ece9e2;
}
iframe { max-width: 100%; }
.stack-24 { margin-bottom: 24px; }
.stack-40 { margin-bottom: 40px; }
.stack-top-16 { margin-top: 16px; }
.stack-top-24 { margin-top: 24px; }

/* ---- Empty / not-found / state blocks (Master Spec §13.1) ---- */
.state-block {
  border: 1px dashed #c8c4bb; border-radius: 8px; padding: clamp(28px,5vw,56px);
  text-align: center; color: var(--muted); background: rgba(255,255,255,.4);
}
.state-block h3 { color: var(--text); font-size: clamp(20px,2.4vw,30px); margin: 0 0 10px; letter-spacing: -.02em; }
.state-block p { margin: 0 auto; max-width: 480px; line-height: 1.55; }
.state-block.error { border-color: #e3b3b3; background: #fbf1f1; }
.state-block.success { border-color: #b9d6b3; background: #f2f8f1; }

/* ---- Forms (contact / admin shared basics) ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid > * { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 13px; letter-spacing: .03em; color: var(--text); font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select {
  border: 1px solid #c8c4bb; border-radius: 6px; padding: 13px 14px; background: #fff;
  color: var(--text); font-size: 16px; min-height: 44px; width: 100%; max-width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #c33; }
.field-error { color: #b02a2a; font-size: 13px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Input + unit/currency pairs (e.g. "45 [days]", "500000 [AMD]"). One row,
   one visual control: the suffix keeps the input's height and border so the
   pair still reads as a single field, and min-width:0 stops the number input
   from pushing the row wider than the screen at 360px. */
.input-group { display: flex; align-items: stretch; width: 100%; }
.input-group > input {
  flex: 1 1 auto; min-width: 0;
  border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.input-group > .input-suffix,
.input-group > select {
  flex: 0 0 auto; display: flex; align-items: center;
  border: 1px solid #c8c4bb; border-left: 0; border-radius: 0 6px 6px 0;
  padding: 0 14px; font-size: 16px; min-height: 44px; color: var(--text);
}
.input-group > .input-suffix { background: #efede7; white-space: nowrap; }
.input-group > select { background: #fff; padding-right: 10px; max-width: 45%; }
.field.has-error .input-group > .input-suffix,
.field.has-error .input-group > select { border-color: #c33; }

/* ---- CTA ---- */
.cta { text-align: center; padding: clamp(110px,15vw,210px) 0; background: #fbfaf7; }
.cta h2 { font-size: clamp(52px,10vw,150px); line-height: .8; letter-spacing: -.07em; margin: 0 0 35px; overflow-wrap: break-word; }
.cta p { color: #77736d; font-size: 16px; margin-bottom: 26px; }

/* ---- Footer ---- */
footer { background: #0a0a0a; color: #f4f1eb; border-top: 1px solid #222; padding: 34px 0 45px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-logo { height: 34px; }
.footer-brand .brand-logo-on-light { display: none; }
.footer-brand .brand-logo-on-dark { display: block; }
.footer-tagline { color: #9a9a9a; font-size: 13px; margin-top: 10px; }
.footer-col { font-size: 13px; line-height: 2; letter-spacing: .05em; color: #b0b0b0; }
.footer-col b { display: block; color: #fff; font-weight: 600; margin-bottom: 6px; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.footer-col a { display: block; }
.footer-col a:hover, .footer-col a:focus-visible { color: #fff; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ---- Mobile nav ---- */
@media (max-width: 900px) {
  .navlinks:not(.mobile-open) { display: none; }
  .menu-btn { display: block; }
  .navlinks.mobile-open {
    display: flex; position: fixed; inset: 68px 0 0 0; background: #0a0a0a !important; color: #fff !important;
    padding: 28px var(--pad); flex-direction: column; align-items: flex-start; gap: 18px; font-size: 16px; overflow-y: auto;
  }
  .navlinks.mobile-open a { color: #fff !important; opacity: 1; }
  .hero { padding-top: 68px; }
  .hero h1 { font-size: clamp(54px,17vw,104px); line-height: .82; letter-spacing: -.055em; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { justify-self: start; }
  .hero-media::before { width: 76vw; height: 104vw; right: -19vw; top: 16vh; }
  .hero-meta { gap: 14px; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project .image, .btn, .service-row, header { transition: none; }
}
