*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #8a8a8a;
  --label: #b4b4b4;
  --line: #ececec;
  --soft: #f4f4f4;
  --max: 1000px;
  --pad: clamp(20px, 5vw, 72px);
  --font: Inter, "Segoe UI", system-ui, sans-serif;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px 37px;
  min-width: 0;
}

.site-nav a {
  font-size: 14px;
  color: #6f6f6f;
}

.site-nav a:hover {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid #6f6f6f;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6f6f6f;
  flex-shrink: 0;
}

.lang-globe {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

/* Hero */

.hero {
  padding: 34px 0 17px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 48px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.eyebrow {
  font-size: 16px;
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  max-width: 14ch;
}

.hero-lead {
  margin-top: 22px;
  max-width: 38ch;
  color: #444;
  font-size: 15px;
  line-height: 1.55;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-pill:hover {
  background: #000;
}

.hero-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  height: min(72vh, 620px);
  min-height: 320px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.hero-stage:active {
  cursor: grabbing;
}

.hero-stage canvas,
.viewer-stage canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}

/* Sections */

.section {
  padding: 72px 0 8px;
}

#works.section {
  padding-top: 50px;
}

.section-label {
  font-size: 15px;
  font-weight: 400;
  color: var(--label);
  margin-bottom: 22px;
}

/* Works */

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 20px;
}

.work-card {
  min-width: 0;
}

.work-media {
  position: relative;
  background: #f7f7f7;
  overflow: hidden;
}

.work-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #fff;
}

.work-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 0;
  background: #4b5361;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: translate(-50%, -50%);
}

.work-3d:hover {
  background: #3d4450;
}

.work-card h3 {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 400;
}

/* Team */

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 36px 40px;
  align-items: start;
}

.team-photo img {
  width: 100%;
  object-fit: cover;
}

.team-copy {
  padding-top: 8px;
  color: #333;
  font-size: 15px;
}

.team-lead {
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
}

.team-copy p + p {
  margin-top: 14px;
}

/* Services */

.services-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.services-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.services-list li span:last-child {
  color: #888;
  flex-shrink: 0;
}

/* Contacts */

.section-contacts {
  padding-bottom: 48px;
}

.contacts-heading {
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 22ch;
  margin-bottom: 36px;
}

.contact-form {
  width: 100%;
  display: grid;
  gap: 22px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form label > span {
  font-size: 13px;
  color: #666;
}

.contact-form i {
  font-style: normal;
  color: #e23b3b;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 6px 0 10px;
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: #111;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #c4c4c4;
}

.contact-form .btn-pill {
  justify-self: start;
  margin-top: 8px;
}

.form-note {
  font-size: 14px;
  color: #555;
}

.form-note.is-error {
  color: #b42318;
}

/* Footer */

.site-footer {
  padding: 48px 0 40px;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.footer-left a {
  display: block;
  margin-bottom: 10px;
}

.footer-left p {
  color: var(--muted);
  font-size: 14px;
}

.footer-social {
  display: flex;
  gap: 14px;
  color: #666;
}

.footer-social a:hover {
  color: #111;
}

/* Viewer */

.viewer-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header-inner-viewer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.viewer-back {
  font-size: 14px;
  color: #444;
}

.viewer-back:hover {
  color: #111;
}

.viewer-title {
  justify-self: end;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  touch-action: none;
  cursor: grab;
}

.viewer-stage:active {
  cursor: grabbing;
}

/* Rubber layout: width only, no orientation queries */

@media (max-width: 860px) {
  .site-nav {
    gap: 12px 22px;
  }

  .hero {
    padding-top: 14px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "eyebrow eyebrow"
      "title title"
      "lead stage"
      "cta stage";
    gap: 10px 16px;
    align-items: start;
  }

  .hero-copy {
    display: contents;
  }

  .eyebrow {
    grid-area: eyebrow;
    margin-bottom: 0;
  }

  .hero-grid h1 {
    grid-area: title;
    min-width: 0;
    max-width: none;
    font-size: clamp(26px, 7.2vw, 42px);
    overflow-wrap: break-word;
  }

  .hero-lead {
    grid-area: lead;
    min-width: 0;
    margin-top: 4px;
    max-width: none;
    font-size: 14px;
  }

  .hero-grid .btn-pill {
    grid-area: cta;
    margin-top: 14px;
    justify-self: start;
  }

  .hero-stage {
    grid-area: stage;
    height: auto;
    min-height: 220px;
    align-self: stretch;
    touch-action: pan-y;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-copy {
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 60px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 10px 16px;
    width: 100%;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 56px;
  }

  #works.section {
    padding-top: 39px;
  }

  .contacts-heading {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero-grid {
    gap: 8px 12px;
  }

  .eyebrow {
    font-size: 13px;
  }

  .hero-grid h1 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .hero-lead {
    font-size: 13px;
  }

  .hero-stage {
    min-height: 200px;
  }

  .btn-pill {
    width: 100%;
  }

  .contact-form .btn-pill {
    width: auto;
    min-width: 140px;
  }
}
