/* ============================================
   PANOCUBE — single source of truth
   Bump ?v= in HTML <link> when you ship changes.
   ============================================ */

/* ── DESIGN TOKENS ──────────────────────────── */
:root {
  /* Colors */
  --bg:           #f9f7f3;
  --ink:          #111;
  --ink-muted:    #555;
  --ink-light:    #888;
  --ink-faint:    #bbb;
  --ink-ghost:    #ccc;
  --ink-whisper:  #ddd;
  --surface:      #eceae5;

  /* Fonts */
  --font-mono:    'IBM Plex Mono', monospace;
  --font-serif:   'Playfair Display', serif;

  /* Spacing */
  --space-xs:     12px;
  --space-sm:     24px;
  --space-md:     48px;
  --space-lg:     80px;
  --space-xl:     120px;

  /* Layout */
  --max-width:    900px;
  --pad-x:        48px;
  --pad-y-top:    56px;
  --pad-y-bot:    100px;

  /* Type scale */
  --fs-label:     14px;
  --fs-nav:       16px;
  --fs-lang:      12px;
  --fs-body:      18px;
  --fs-meta:      13px;
}

/* ── RESET ──────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--pad-y-top) var(--pad-x) var(--pad-y-bot);
  overflow-x: hidden;
}

/* ── HEADER ─────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-xl);
}

.header-right {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.logo {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

nav {
  display: flex;
  gap: var(--space-sm);
}

nav a {
  font-size: var(--fs-nav);
  color: var(--ink-faint);
  text-decoration: none;
}
nav a:hover { color: var(--ink); }

/* ── LANG SWITCHER ──────────────────────────── */
.lang {
  display: flex;
  gap: 0;
  font-size: var(--fs-lang);
  letter-spacing: 0.1em;
}

.lang button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--fs-lang);
  color: var(--ink-ghost);
  padding: 0;
  letter-spacing: 0.1em;
  transition: color 0.15s;
}
.lang button:hover { color: var(--ink-light); }
.lang button.active { color: var(--ink); font-weight: 700; }

.lang span {
  color: var(--ink-whisper);
  padding: 0 6px;
  user-select: none;
}

/* ── COMMON TYPOGRAPHY ──────────────────────── */
.label {
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

/* ── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 16px 36px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 16px;
  text-decoration: none;
}
.btn:hover { opacity: 0.75; }

/* ── SHARED THUMB OVERLAY (portfolio cards) ─── */
.thumb {
  width: 100%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.thumb > span {
  font-size: var(--fs-meta);
  color: var(--ink-faint);
}

.thumb .overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.thumb .view-label {
  color: var(--bg);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s;
}

.thumb-link:hover .overlay { background: rgba(17, 17, 17, 0.6); }
.thumb-link:hover .view-label { opacity: 1; }

/* ── PAGE: INDEX — HERO ─────────────────────── */
.hero { margin-bottom: var(--space-xl); }

.big {
  font-family: var(--font-serif);
  font-size: clamp(80px, 15vw, 148px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 64px;
}

.big em { font-style: italic; font-weight: 700; }

.hero-desc {
  font-size: 22px;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: var(--space-md);
}
.hero-desc strong { color: var(--ink); }

/* ── PAGE: INDEX — TOUR ─────────────────────── */
.tour { margin-bottom: var(--space-xl); }

.tour-embed {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tour-embed span {
  font-size: 16px;
  color: var(--ink-faint);
}

/* ── PAGE: INDEX — SERVICES ─────────────────── */
.services { margin-bottom: var(--space-xl); }
.services .label { margin-bottom: var(--space-md); }

.service {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: baseline;
  margin-bottom: 56px;
}

.s-name {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.s-desc {
  font-size: var(--fs-body);
  color: var(--ink-light);
  line-height: 1.7;
}

.s-price {
  font-size: 24px;
  font-weight: 700;
  text-align: right;
}

.s-note {
  font-size: var(--fs-label);
  color: var(--ink-faint);
  text-align: right;
  margin-top: 6px;
}

/* ── PAGE: INDEX — PORTFOLIO PREVIEW ────────── */
.portfolio-preview { margin-bottom: var(--space-xl); }
.portfolio-preview .label { margin-bottom: var(--space-md); }

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: 36px;
}

.preview-card {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.preview-card:hover { opacity: 0.75; }

.preview-card .thumb {
  aspect-ratio: 4/3;
  margin-bottom: var(--space-xs);
}

.pc-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
}

.pc-meta {
  font-size: 12px;
  color: var(--ink-faint);
}

.all-projects {
  font-size: var(--fs-nav);
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.all-projects:hover { color: var(--ink-faint); }

/* ── PAGE: INDEX — ABOUT (hidden until photo) ─ */
.about { display: none; margin-bottom: var(--space-xl); }
.about .label { margin-bottom: var(--space-md); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-photo span {
  font-size: var(--fs-meta);
  color: var(--ink-faint);
}

.about-text {
  font-size: 20px;
  color: var(--ink-muted);
  line-height: 1.75;
}
.about-text strong { color: var(--ink); }

/* ── PAGE: INDEX — CONTACT ──────────────────── */
.contact { margin-bottom: var(--space-lg); }
.contact .label { margin-bottom: var(--space-md); }

.contact-big {
  font-family: var(--font-serif);
  font-size: clamp(56px, 10vw, 112px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 64px;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.contact-links a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 22px;
}
.contact-links a:hover { color: var(--ink-faint); }

.contact-note {
  font-size: var(--fs-body);
  color: var(--ink-faint);
  line-height: 1.8;
}

/* ── PAGE: PORTFOLIO ────────────────────────── */
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(56px, 10vw, 112px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.page-subtitle {
  font-size: 20px;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.filters {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.filters button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--ink-faint);
  padding: 8px 0;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}
.filters button:hover { color: var(--ink-light); }
.filters button.active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: var(--space-xl);
}

.portfolio-item {
  cursor: pointer;
  transition: opacity 0.2s;
}
.portfolio-item:hover { opacity: 0.8; }
.portfolio-item.hidden { display: none; }

.portfolio-item .thumb {
  aspect-ratio: 4/3;
  margin-bottom: 16px;
}

.p-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}

.p-meta {
  font-size: var(--fs-meta);
  color: var(--ink-faint);
}

/* ── PAGE: PORTFOLIO — CTA ──────────────────── */
.cta {
  text-align: center;
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-lg);
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

/* ── FOOTER ─────────────────────────────────── */
footer {
  font-size: var(--fs-label);
  color: var(--ink-ghost);
  display: flex;
  justify-content: space-between;
}

/* ── MOBILE ─────────────────────────────────── */
@media (max-width: 600px) {
  body { padding: 32px 20px 60px; }

  header { flex-wrap: wrap; gap: 16px; }
  .header-right { flex-wrap: wrap; gap: 12px; }

  /* Hero title: уменьшаем минимум чтобы не рвало layout */
  .big { font-size: clamp(52px, 14vw, 148px); }

  .service { grid-template-columns: 1fr; gap: var(--space-xs); }
  .s-price, .s-note { text-align: left; }
  .about-inner { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
  .big { font-size: 44px; }
  .contact-big { font-size: clamp(44px, 10vw, 112px); }
}
