/* Narralith Studios: static site styles
   Built from the Figma "Untitled" design (Home, /work, /about, /contact).
   No build step: plain CSS, served as-is. */

/* ---------- Tokens ---------- */
:root {
  --c-paper: #eaeaea;      /* light page background */
  --c-ink: #2e2e2e;        /* dark text + hero bars */
  --c-night: #212121;      /* dark page / footer background */
  --c-mist: #dbdbdb;       /* light text on dark pages */
  --c-cream: #fffaf0;      /* footer text */
  --c-cream-70: rgba(255, 250, 240, 0.7);
  --c-red: #da4646;        /* work page footer */
  --c-white-50: rgba(255, 255, 255, 0.5);

  /* The design uses Druk Wide Bold / Akira Expanded (licensed fonts).
     Archivo Expanded (Google Fonts, free) stands in until the licensed
     web-font files are added. To switch, add @font-face rules for the
     licensed files and put their family name first here. */
  --f-display: "Archivo", "Arial Black", sans-serif;
  --f-display-stretch: 125%;
  --f-text: "Lexend", system-ui, sans-serif;
  --f-ui: "Inter", system-ui, sans-serif;

  --gutter: clamp(16px, 2.65vw, 34px);
  --nav-gutter: clamp(16px, 3.75vw, 48px);
  --max: 1280px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.3;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.page-dark { background: var(--c-night); color: var(--c-mist); }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.display {
  font-family: var(--f-display);
  font-stretch: var(--f-display-stretch);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.85;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--c-ink); color: var(--c-paper); padding: 8px 12px;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 2px solid var(--c-red); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  max-width: var(--max); margin: 0 auto;
  padding: 47px var(--nav-gutter) 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
}
.site-header .logo img { width: 197px; height: 34px; }
.site-nav { display: flex; gap: 48px; font-size: 20px; letter-spacing: -0.02em; line-height: 1.1; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] {
  text-decoration: underline; text-underline-position: from-font;
}
.page-dark .site-nav { color: #fff; }

@media (max-width: 640px) {
  .site-header { padding-top: 24px; align-items: center; }
  .site-header .logo img { width: 140px; height: auto; }
  .site-nav { gap: 18px; font-size: 16px; }
}

/* ---------- Home: hero ---------- */
.hero { padding-top: 147px; }
.hero-title { font-size: clamp(44px, 10vw, 128px); color: var(--c-paper); margin-left: -2px; }
.hero-title span {
  display: table;              /* one bar per line, sized to the text */
  background: var(--c-ink);
  padding: 0.06em 0.07em 0;
  margin-bottom: 0.03em;
}
.hero-sub { margin-top: 36px; font-size: clamp(20px, 2.45vw, 31.25px); letter-spacing: -0.02em; line-height: 1; }

/* ---------- Home: mission ---------- */
.mission {
  padding-top: clamp(120px, 30vw, 385px);
  display: grid; grid-template-columns: 1fr minmax(0, 580px); gap: 40px;
}
.section-label { font-size: 28px; letter-spacing: -0.02em; line-height: 1; }
.mission p { font-size: clamp(20px, 2.45vw, 31.25px); letter-spacing: -0.02em; line-height: 1; }
@media (max-width: 760px) { .mission { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Sneak peeks (home) ---------- */
.peek { padding-block: clamp(80px, 10vw, 140px); }
.peek-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 48px;
}
.peek-head .section-label { font-size: clamp(22px, 2.2vw, 28px); }
.more-link {
  font-size: 20px; letter-spacing: -0.02em; line-height: 1.1;
  text-decoration: underline; text-underline-position: from-font; white-space: nowrap;
}
.more-link::after { content: " \2192"; }

.peek-work { background: var(--c-night); color: var(--c-mist); margin-top: clamp(100px, 12vw, 160px); }

/* Carousel */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter); padding-bottom: 4px;
  scrollbar-width: none;
  list-style: none; margin: 0;
  max-width: calc(var(--max) + (100vw - var(--max)) / 2);
}
.carousel-track::-webkit-scrollbar { display: none; }
@media (min-width: 1280px) {
  .carousel-track { margin-left: calc((100vw - var(--max)) / 2); max-width: none; padding-right: var(--gutter); }
}
.carousel-track > li { flex: 0 0 min(78vw, 760px); scroll-snap-align: start; }
.carousel-controls { display: flex; gap: 12px; }
.carousel-btn {
  width: 52px; height: 52px; border: 2px solid var(--c-mist); background: transparent;
  color: var(--c-mist); font-size: 22px; line-height: 1; cursor: pointer;
}
.carousel-btn:hover:not(:disabled) { background: var(--c-mist); color: var(--c-night); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
.carousel-foot { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.carousel-count { font-size: 16px; color: var(--c-white-50); font-variant-numeric: tabular-nums; }

/* About peek */
.peek-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: end; }
.peek-about .display { font-size: clamp(36px, 6.19vw, 79.26px); line-height: 0.8; letter-spacing: -0.02em; }
.peek-about p { font-size: 18.8px; line-height: 1.15; }
.peek-about p + p { margin-top: 18px; }
.peek-about .more-link { display: inline-block; margin-top: 32px; }
@media (max-width: 860px) { .peek-about { grid-template-columns: 1fr; } }

/* Contact peek */
.peek-contact { border-top: 2px solid var(--c-ink); }
.contact-title { font-size: clamp(40px, 8vw, 104px); color: var(--c-paper); }
.contact-title span { display: table; background: var(--c-ink); padding: 0.06em 0.07em 0; margin-bottom: 0.03em; }
.peek-contact-grid { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 40px; align-items: end; }
.peek-contact-grid p { font-size: clamp(20px, 2.45vw, 31.25px); letter-spacing: -0.02em; line-height: 1; }
.peek-contact-grid .more-link { display: inline-block; margin-top: 28px; }
@media (max-width: 860px) { .peek-contact-grid { grid-template-columns: 1fr; } }

/* Placeholder content waiting on real info. Search for "PLACEHOLDER". */
.placeholder {
  outline: 2px dashed var(--c-red); outline-offset: 4px;
  background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(218, 70, 70, 0.08) 8px 16px);
}

/* ---------- Project card (work page + carousel) ---------- */
.project {
  position: relative; overflow: hidden; display: block; text-decoration: none; color: #fff;
  aspect-ratio: 1211 / 650; background: #111;
}
.project-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: bottom; }
.project::before {   /* left shade behind the caption */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 25.5%; z-index: 1;
  background: linear-gradient(to right, rgba(2, 2, 2, 0.74) 12%, rgba(0, 0, 0, 0) 92%);
}
.project.shade-soft::before {
  background: linear-gradient(to right, rgba(2, 2, 2, 0.32) 13%, rgba(0, 0, 0, 0.03) 79%, rgba(0, 0, 0, 0) 100%);
}
.project-logo { position: absolute; z-index: 1; height: auto; }
.project-caption {
  position: absolute; z-index: 2; left: 3.9%; bottom: 8%; font-weight: 400;
  font-size: clamp(13px, 1.47vw, 18.8px); letter-spacing: -0.02em; line-height: 1;
}
.project-caption .sub { display: block; margin-top: 1em; color: var(--c-white-50); }
.tag {
  display: inline-block; margin-top: 0.85em; padding: 4px 5px 3px;
  border: 1px solid var(--c-white-50); color: var(--c-white-50);
  font-size: 0.62em; line-height: 1;
}
.project img.project-img { transition: transform 0.6s ease; }
.project:hover img.project-img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .project img.project-img { transition: none; } }

/* Logo positions, as % of the card (from the Figma layout) */
.logo-modix { left: 31.2%; top: 18%; width: 35.25%; }
.logo-trakya { left: 50%; top: 16.8%; width: 19.1%; transform: translateX(-50%); }
.logo-enerwach-icon { left: 27.7%; top: 16.3%; width: 5.7%; }
.logo-enerwach-type { left: 35.1%; top: 16.3%; width: 37.2%; }
.logo-enerwach-tag { left: 48.7%; top: 28.8%; width: 23.5%; }

/* ---------- Work page ---------- */
.page-title { padding-top: 144px; font-size: clamp(38px, 6.19vw, 79.26px); line-height: 0.8; color: var(--c-paper); }
.page-dark .page-title { color: var(--c-paper); }
.page-light .page-title { color: var(--c-ink); }
.page-lede { margin-top: 34px; font-size: 18.8px; letter-spacing: -0.02em; line-height: 0.95; }

.work-list { list-style: none; margin: 0; padding: 0; padding-top: clamp(80px, 16vw, 205px); display: grid; gap: clamp(40px, 9.4vw, 120px); }
.load-more {
  display: block; width: 100%; margin-top: 88px; height: clamp(90px, 11.8vw, 151px);
  border: 2px solid var(--c-mist); background: transparent; color: var(--c-mist);
  font-family: var(--f-text); font-size: clamp(28px, 3.9vw, 49.7px); letter-spacing: -0.02em; cursor: pointer;
}
.load-more:hover { background: var(--c-mist); color: var(--c-night); }
.load-more[hidden] { display: none; }

/* ---------- About page ---------- */
.about-intro { margin-top: 78px; max-width: 300px; font-size: 18.8px; line-height: 1; }
.about-intro p + p { margin-top: 18.8px; }

.about-block { padding-top: clamp(100px, 14vw, 180px); display: grid; grid-template-columns: 1fr minmax(0, 580px); gap: 40px; }
.about-block h2 { font-size: 28px; }
.about-block .lead { font-size: clamp(20px, 2.45vw, 31.25px); letter-spacing: -0.02em; line-height: 1; }

.pillars { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--c-ink); }
.pillars li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 22px 0; border-bottom: 2px solid var(--c-ink); }
.pillars .num { font-family: var(--f-display); font-stretch: var(--f-display-stretch); font-variation-settings: "wdth" 125; font-weight: 900; font-size: 20px; }
.pillars h3 { font-family: var(--f-text); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; }
.pillars p { margin-top: 8px; font-size: 18px; line-height: 1.25; }
@media (max-width: 760px) { .about-block { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Contact page ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.contact-list dt, .contact-list .k { font-size: 16px; color: #6b6b6b; margin-bottom: 6px; }
.contact-list .v { font-size: clamp(20px, 2.45vw, 31.25px); letter-spacing: -0.02em; line-height: 1.05; display: inline-block; padding: 2px 6px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-night); color: var(--c-cream);
  position: relative; overflow: hidden;
  margin-top: clamp(60px, 8vw, 120px);
}
.page-dark .site-footer { background: var(--c-red); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 80px 64px 0; min-height: 333px;
  display: flex; justify-content: space-between; gap: 40px;
}
.socials { display: flex; flex-direction: column; gap: 24px; }
.socials a { display: block; width: 24px; height: 24px; }
.socials img { width: 24px; height: 24px; }
.footer-nav { display: flex; gap: 40px; }
.footer-nav div { width: 130px; display: flex; flex-direction: column; gap: 8px; }
.footer-nav h2 { font-family: var(--f-text); font-weight: 600; font-size: 16px; letter-spacing: -0.005em; line-height: 1.45; padding-bottom: 16px; }
.footer-nav a { font-family: var(--f-ui); font-weight: 500; font-size: 16px; letter-spacing: -0.005em; line-height: 1.45; color: var(--c-cream-70); text-decoration: none; }
.footer-nav a:hover { color: var(--c-cream); }
/* Big NARRALITH wordmark along the bottom edge, sized to span the full width. */
.footer-wordmark {
  font-family: var(--f-display); font-stretch: var(--f-display-stretch);
  font-variation-settings: "wdth" 125; font-weight: 900; text-transform: uppercase;
  /* Sized so the letters' ink spans exactly 100vw; the margin removes the
     N's left side bearing. Retune if the display font changes. */
  font-size: 13.21vw; line-height: 0.69; letter-spacing: -0.02em;
  margin: 0 0 -0.02em -0.07em; white-space: nowrap; color: #2b2b2b;
  padding-top: 0.06em; user-select: none;
}
.page-dark .footer-wordmark { color: #e35d5d; }
@media (max-width: 760px) {
  .footer-inner { flex-direction: column; padding: 56px var(--gutter) 40px; min-height: 0; }
  .socials { flex-direction: row; }
  .footer-nav { flex-wrap: wrap; gap: 28px 24px; }
}

/* Visually hidden, still read by screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Enes photo: the design crops it ~110% (it has a light strip on the right edge). */
.project img.project-img.zoom { transform: scale(1.1); transform-origin: 40% 50%; }
.project:hover img.project-img.zoom { transform: scale(1.13); }
