/* KSGN Innovations — company portal */

:root {
  --ink: #12151a;
  --ink-soft: #2c323c;
  --muted: #5c6570;
  --line: rgba(18, 21, 26, 0.12);
  --paper: #f5f6f4;
  --paper-deep: #e8ebe6;
  --surface: #ffffff;
  --accent: #1f5c4d;
  --accent-hover: #174a3e;
  --accent-soft: rgba(31, 92, 77, 0.1);
  --hero-from: #0e2a24;
  --hero-mid: #163d34;
  --hero-to: #1a4a3f;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Sora", "Segoe UI", sans-serif;
  --space: clamp(1rem, 2vw, 1.5rem);
  --max: 1120px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

address {
  font-style: normal;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 6.5vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(245, 246, 244, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(245, 246, 244, 0.96);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 1.65rem;
  height: 1.65rem;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
}

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

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: var(--ink);
  margin-inline: auto;
  transition: transform 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover {
  color: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #f7faf8;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #f7faf8;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-nav {
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: #f5f6f4;
  font-size: 0.8rem;
}

.btn-nav:hover {
  background: var(--accent);
  color: #f5f6f4;
}

/* Hero */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
  overflow: hidden;
  color: #eef2ef;
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 48%, var(--hero-to) 100%);
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(120, 180, 150, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 45% at 10% 90%, rgba(40, 90, 70, 0.45), transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  opacity: 0.55;
  pointer-events: none;
  animation: grid-drift 28s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0; }
  to { background-position: 64px 64px; }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 4rem);
  max-width: 40rem;
}

.hero-brand {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(220, 235, 225, 0.72);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.1s forwards;
}

.hero h1 {
  color: #f4f7f5;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.22s forwards;
}

.hero-lead {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(232, 240, 235, 0.82);
  max-width: 32rem;
  margin-bottom: 2.25rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.34s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.46s forwards;
}

.hero .btn-primary {
  background: #e8f0eb;
  color: var(--hero-from);
}

.hero .btn-primary:hover {
  background: #fff;
  color: var(--hero-from);
}

.hero .btn-ghost {
  color: #e8f0eb;
  border-color: rgba(232, 240, 235, 0.35);
}

.hero .btn-ghost:hover {
  border-color: #e8f0eb;
  color: #fff;
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-panel {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(232, 240, 235, 0.18);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.4s forwards;
}

.panel-line {
  position: absolute;
  left: 12%;
  right: 12%;
  height: 1px;
  background: rgba(232, 240, 235, 0.2);
}

.panel-line:nth-child(1) { top: 28%; }
.panel-line:nth-child(2) { top: 50%; width: 55%; }
.panel-line:nth-child(3) { top: 72%; width: 38%; }

.panel-orb {
  position: absolute;
  width: 9rem;
  height: 9rem;
  right: -1.5rem;
  bottom: 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(180, 220, 200, 0.35), rgba(31, 92, 77, 0.15) 55%, transparent 70%);
  border: 1px solid rgba(232, 240, 235, 0.15);
  animation: orb-float 7s var(--ease) infinite alternate;
}

@keyframes orb-float {
  from { transform: translate(0, 0); }
  to { transform: translate(-12px, -18px); }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Trust strip */

.trust-strip {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}

.trust-strip p {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Sections */

.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) 0;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-intro {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-intro h2 {
  margin-bottom: 1.1rem;
}

.section-copy {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

/* Capabilities */

.capabilities {
  background: var(--surface);
}

.capability-rows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.capability {
  padding: 2rem 1.75rem 2rem 0;
  border-bottom: 1px solid var(--line);
}

.capability:not(:last-child) {
  border-right: 1px solid var(--line);
  padding-right: 2rem;
  margin-right: 1.75rem;
}

.capability h3 {
  margin-bottom: 0.75rem;
}

.capability p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Services */

.services {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.service-item {
  display: grid;
  grid-template-columns: minmax(10rem, 0.42fr) 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease), background 0.35s var(--ease);
}

.service-item:hover {
  padding-left: 0.5rem;
}

.service-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.service-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Approach */

.approach {
  background: var(--surface);
}

.approach-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.approach-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.approach-steps li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.approach-steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.step-num {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--accent);
  line-height: 1.2;
}

.approach-steps h3 {
  margin-bottom: 0.4rem;
}

.approach-steps p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* CTA band */

.cta-band {
  background:
    linear-gradient(120deg, var(--hero-from), var(--hero-to));
  color: #eef2ef;
  text-align: center;
}

.cta-inner {
  max-width: 36rem;
}

.cta-band h2 {
  color: #f4f7f5;
  margin-bottom: 0.85rem;
}

.cta-band p {
  color: rgba(232, 240, 235, 0.8);
  margin-bottom: 1.75rem;
}

.cta-band .btn-primary {
  background: #e8f0eb;
  color: var(--hero-from);
}

.cta-band .btn-primary:hover {
  background: #fff;
  color: var(--hero-from);
}

/* Contact */

.contact {
  background: var(--paper);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.detail-block {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.detail-block h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.detail-block p,
.detail-block address {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.detail-block a {
  text-decoration: none;
  font-weight: 500;
}

.detail-block a:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.75rem 0;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand .brand-name {
  font-size: 1.15rem;
}

.footer-legal {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-copy {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-top {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
}

.footer-top:hover {
  color: var(--accent);
}

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding-top: clamp(3.5rem, 12vw, 5rem);
    padding-bottom: 2.5rem;
    max-width: none;
  }

  .hero-visual {
    min-height: 16rem;
    padding-top: 0;
    padding-bottom: 3rem;
  }

  .hero-panel {
    width: min(100%, 16rem);
    aspect-ratio: 16 / 10;
  }

  .capability-rows {
    grid-template-columns: 1fr;
  }

  .capability:not(:last-child) {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
  }

  .approach-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .footer-copy {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .btn-nav {
    display: none;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    background: rgba(245, 246, 244, 0.98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.9rem clamp(1.25rem, 4vw, 2rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-brand,
  .hero h1,
  .hero-lead,
  .hero-actions,
  .hero-panel,
  .panel-orb,
  .hero-grid,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
