:root {
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #bdc7d3;
  --line: rgba(255, 255, 255, 0.14);
  --gold: #d6b36a;
  --gold-soft: rgba(214, 179, 106, 0.18);
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, var(--gold-soft), transparent 34rem),
    radial-gradient(circle at 88% 28%, rgba(94, 129, 172, 0.18), transparent 28rem),
    linear-gradient(135deg, #111923 0%, #090e15 55%, #05070a 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.ambient { position: fixed; border-radius: 999px; filter: blur(55px); z-index: -3; opacity: .45; }
.ambient-one { width: 360px; height: 360px; background: #6d45ff; left: -140px; top: 150px; }
.ambient-two { width: 300px; height: 300px; background: #f2d45c; right: -120px; top: 520px; opacity: .18; }

.background-mark {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url("logo.png") center/min(90vw, 960px) no-repeat;
  opacity: 0.065;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 4.5rem);
  background: rgba(7, 11, 16, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: .8rem; font-weight: 850; letter-spacing: -.03em; text-transform: uppercase; }
.brand img { width: 46px; height: 46px; object-fit: contain; }

nav { display: flex; align-items: center; gap: 1.05rem; color: var(--muted); font-weight: 650; }
nav a:hover { color: var(--text); }

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  align-items: center;
  padding: clamp(1.8rem, 4vw, 4.4rem) clamp(1rem, 4vw, 4.5rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: stretch;
  width: min(1280px, 100%);
  margin: auto;
}

.equal-box {
  height: min(62vh, 560px);
  min-height: 430px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.35rem, 3vw, 2.7rem);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 5.5vw, 5.7rem);
  line-height: .9;
  letter-spacing: -.08em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 3.15vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.055em;
}

h3 { margin-bottom: .75rem; font-size: 1.22rem; }

.lead, .section-lead {
  max-width: 68ch;
  color: var(--muted);
  font-size: clamp(.98rem, 1.1vw, 1.1rem);
  line-height: 1.6;
}

.lead.small { font-size: .95rem; }

.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.35rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .78rem 1.08rem;
  border-radius: 999px;
  font-weight: 850;
}

.button.primary { color: #171109; background: var(--gold); }
.button.ghost { border: 1px solid var(--line); background: rgba(255,255,255,.06); }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: radial-gradient(circle at center, rgba(141,104,255,.24), rgba(255,255,255,.035) 58%, rgba(255,255,255,.02));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual:before {
  content: "";
  position: absolute;
  inset: 4.5%;
  border: 1px solid rgba(242,212,92,.22);
  border-radius: 28px;
}

.hero-visual img {
  width: min(112%, 760px);
  max-height: 112%;
  object-fit: contain;
  filter: drop-shadow(0 25px 50px rgba(0,0,0,.55));
}

.section {
  padding: clamp(3.5rem, 6vw, 6.2rem) clamp(1rem, 4vw, 4.5rem);
  width: min(1280px, 100%);
  margin: auto;
}

.section-heading { max-width: 850px; margin-bottom: 1.8rem; }

.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

.service-card, .value-list div, .contact-card, .origin-image, .origin-copy, .env-grid span {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 26px;
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
}

.service-card { min-height: 220px; padding: 1.25rem; transition: transform 180ms ease, background 180ms ease; }
.service-card:hover { transform: translateY(-4px); background: var(--surface-strong); }
.service-card span { display: inline-flex; margin-bottom: 2rem; color: var(--gold); font-weight: 850; }

.service-card p, .value-list p, .origin-copy p, .contact-card p {
  color: var(--muted);
  line-height: 1.62;
}

.values { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1.2rem; align-items: start; }
.value-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.value-list div { padding: 1.25rem; }
.value-list strong { display: block; margin-bottom: .45rem; font-size: 1.03rem; }

.env-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .9rem; }
.env-grid span {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: .9rem 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
}

/* Balanced origin: image and text same height */
.origin {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.origin-equal {
  height: 360px;
}

.origin-image {
  width: 360px;
  overflow: hidden;
  padding: .5rem;
  justify-self: start;
  background: rgba(255,255,255,.055);
}

.origin-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  border-radius: 16px;
  filter: sepia(.12) contrast(1.03);
}

.origin-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.35rem, 2.4vw, 2.35rem);
  overflow: hidden;
}

.contact-card {
  padding: clamp(1.4rem, 3vw, 2.7rem);
  background: linear-gradient(135deg, var(--surface-strong), rgba(214,179,106,.09));
}

.contact-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.2rem; }
.contact-row a, .contact-row span {
  display: inline-flex;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  font-weight: 750;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem clamp(1rem, 4vw, 4.5rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (min-width: 1800px) {
  .hero-inner, .section { width: min(1400px, 100%); }
  h1 { font-size: clamp(3.2rem, 4.4vw, 5.9rem); }
  .equal-box { height: min(58vh, 540px); }
  .hero-visual img { width: min(114%, 790px); max-height: 114%; }
  .origin { grid-template-columns: 340px 1fr; }
  .origin-image { width: 340px; }
  .origin-equal { height: 340px; }
}

@media (max-width: 1100px) {
  .hero-inner, .values, .origin { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .equal-box { height: auto; min-height: 420px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .env-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-visual img { width: min(96%, 660px); max-height: 96%; }
  .origin-image {
    width: min(100%, 520px);
    height: auto;
    justify-self: center;
  }
  .origin-equal { height: auto; }
  .origin-image img {
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 700px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { width: 100%; justify-content: space-between; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; font-size: .93rem; }
  .hero { min-height: auto; padding-top: 2rem; }
  .hero-copy, .hero-visual { border-radius: 24px; }
  .equal-box { min-height: 340px; }
  .service-grid, .value-list, .env-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

/* ===== V26 CLEAN FINAL IMAGE POSITION ===== */
/* No inline style overrides. This is the final image positioning. */

/* Menu click positioning */
html {
  scroll-padding-top: 120px;
}

#services,
#values,
#environments,
#origin,
#contact {
  scroll-margin-top: 120px;
}

/* Hero logo frame stays as current layout */
.hero-visual {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Logo: larger and lower, centered in the right frame */
.hero-visual img {
  width: 112% !important;
  height: 112% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: translateY(55px) !important;
  display: block !important;
}

/* Old engraving: keep full image visible */
.origin-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 1rem !important;
}

.origin-image img {
  width: 92% !important;
  height: 92% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

/* Large desktop / 4K */
@media (min-width: 1800px) {
  html {
    scroll-padding-top: 135px;
  }

  #services,
  #values,
  #environments,
  #origin,
  #contact {
    scroll-margin-top: 135px;
  }

  .hero-visual img {
    width: 118% !important;
    height: 118% !important;
    transform: translateY(65px) !important;
  }
}

/* Tablet / mobile */
@media (max-width: 1100px) {
  .hero-visual img {
    width: 88% !important;
    height: auto !important;
    transform: none !important;
  }

  .origin-image img {
    width: 100% !important;
    height: auto !important;
  }
}


/* ===== V27 LOGO MIDDLE SIZE FINAL OVERRIDE ===== */
/* Smaller than V26, bigger than the tiny version. Full logo should fit. */

.hero-visual {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.4rem !important;
  overflow: hidden !important;
}

.hero-visual img {
  width: auto !important;
  height: 92% !important;
  max-width: 92% !important;
  max-height: 92% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: translateY(18px) !important;
  display: block !important;
}

/* Large desktop / 4K */
@media (min-width: 1800px) {
  .hero-visual img {
    height: 94% !important;
    max-height: 94% !important;
    max-width: 94% !important;
    transform: translateY(20px) !important;
  }
}

/* Tablet / mobile */
@media (max-width: 1100px) {
  .hero-visual img {
    width: 88% !important;
    height: auto !important;
    max-width: 88% !important;
    transform: none !important;
  }
}
