:root {
  --black: #050607;
  --ink: #090909;
  --muted: #56595b;
  --line: #d5d6d7;
  --soft: #f5f5f5;
  --page: 1440px;
  --container: 1440px;
  --side: clamp(24px, 4vw, 80px);
  --common-frame: min(100%, var(--page));
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #fff;
  font-family: "Manrope", "Noto Sans KR", Arial, sans-serif;
  letter-spacing: 0;
}

.site-header,
main > section,
.site-footer {
  width: var(--common-frame);
  margin-inline: auto;
}

/* RiO common layout rule:
   Every page must keep the common header and common footer on the same
   frame as the main page. Page-specific content can vary, but these two
   regions stay locked to the shared 1440px frame. */
body > .site-header,
body > .site-footer {
  width: var(--common-frame);
  margin-left: auto;
  margin-right: auto;
}

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

.container {
  width: min(var(--container), calc(100% - (var(--side) * 2)));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 20;
  height: 65px;
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr) 154px;
  align-items: stretch;
  padding-left: clamp(24px, 3vw, 42px);
  padding-right: 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #eeeeee;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-left: 0;
  min-width: 0;
}

.brand-symbol {
  position: relative;
  display: block;
  width: 36px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: cover;
  filter: brightness(.15);
}

.brand-symbol b {
  position: absolute;
  font-weight: 400;
  line-height: 1;
}

.brand-symbol b:first-child {
  left: 0;
  top: 0;
  font-size: 40px;
}

.brand-symbol b:last-child {
  right: 0;
  bottom: 0;
  font-size: 30px;
}

.brand-divider {
  width: 1px;
  height: 40px;
  background: #a5a5a5;
}

.brand-copy {
  display: grid;
  gap: 7px;
}

.brand-copy strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 5px;
  white-space: nowrap;
}

.brand-copy small {
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 2px;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 610px;
  margin: 0 auto;
  padding: 0 22px;
}

.desktop-nav a,
.nav-trigger {
  font-size: 10px;
  font-weight: 700;
}

.nav-trigger {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.nav-group {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-submenu {
  position: absolute;
  z-index: 80;
  top: 100%;
  left: 50%;
  width: 360px;
  padding: 10px 0;
  background: rgba(255, 255, 255, .98);
  border: 1px solid #e6e6e6;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .08);
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-submenu a {
  display: flex;
  position: relative;
  z-index: 1;
  gap: 5px;
  align-items: flex-start;
  padding: 12px 18px;
  color: #111;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.nav-submenu a:hover {
  background: #f5f5f5;
}

.nav-submenu b {
  flex: 0 0 22px;
  color: #777;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.nav-submenu span {
  display: block;
  flex: 1;
  font-size: 11px;
  font-weight: 700;
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: #020202;
}

.header-cta {
  padding: 0 20px;
  font-size: 10px;
  font-weight: 600;
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  min-height: clamp(420px, 41.2vw, 590px);
  overflow: hidden;
  background: linear-gradient(90deg, #fff 0 38%, #fbfbfb 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: clamp(420px, 41.2vw, 590px);
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(450px, 43vw);
}

.eyebrow {
  margin: 0 0 24px;
  font-size: 11px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 3.8vw, 56px);
  line-height: 1.24;
  font-weight: 800;
}

.hero-description {
  margin: 27px 0 32px;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.65;
}

.button {
  width: 170px;
  min-height: 46px;
  padding: 0 25px;
  font-size: 14px;
  font-weight: 600;
}

.button-small {
  width: 178px;
  min-height: 46px;
  margin-top: 23px;
  margin-bottom: 18px;
  font-size: 12px;
}

.hero-art {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 66%;
  height: 100%;
  background:
    linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .28) 15%, transparent 38%),
    url("assets/hero-blueprint.png") left center / cover no-repeat;
  pointer-events: none;
}

.dark-section {
  color: #fff;
  background:
    radial-gradient(circle at 70% 50%, rgba(255, 255, 255, .05), transparent 24%),
    linear-gradient(90deg, #050607, #111314 55%, #050607);
}

.philosophy {
  padding: 18px 0;
}

.philosophy-layout {
  display: grid;
  grid-template-columns: 145px 1px 1fr;
  gap: 0;
  align-items: center;
}

.philosophy-copy {
  margin-left: clamp(32px, 4.8vw, 58px);
}

.section-kicker {
  align-self: start;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 700;
}

.section-kicker i {
  display: block;
  width: 26px;
  height: 1px;
  margin-top: 20px;
  background: currentColor;
}

.section-kicker.light {
  color: #fff;
}

.vertical-rule {
  width: 1px;
  height: 110px;
  background: rgba(255, 255, 255, .48);
}

.philosophy-copy h2 {
  margin: 0 0 22px;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.65;
  font-weight: 500;
}

.philosophy-copy p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  line-height: 1.7;
}

.section-layout {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: clamp(24px, 2.6vw, 38px);
}

.process-section {
  padding: 31px 0;
}

.process-grid,
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-grid li,
.capabilities-grid article {
  min-width: 0;
  padding: 0 clamp(18px, 2vw, 30px);
  border-left: 1px solid var(--line);
}

.process-grid li {
  position: relative;
}

.process-grid li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 56px;
  right: 10px;
  font-size: 20px;
  font-weight: 400;
}

.process-grid strong {
  display: block;
  margin-bottom: 17px;
  font-size: 17px;
  font-weight: 500;
}

.process-grid h3,
.capabilities-grid h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.process-grid h3::after {
  content: "";
  display: block;
  width: min(92px, 68%);
  height: 1px;
  margin: 13px 0 14px;
  background: var(--line);
}

.process-grid p,
.capabilities-grid p {
  margin: 0;
  color: #292929;
  font-size: 11px;
  line-height: 1.75;
}

.capabilities-section {
  padding: 20px 0;
  background: var(--soft);
}

.capabilities-grid h3 {
  min-height: 42px;
  margin-bottom: 12px;
}

.works-section {
  padding: 36px 0 24px;
}

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

.work-card {
  position: relative;
  min-height: 165px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px;
  color: #fff;
  background: #0b0b0b;
  isolation: isolate;
}

.work-card::before,
.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.work-card::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .9));
}

.work-building::before {
  background: url("assets/work-manufacturing.png") center 52% / cover no-repeat;
}

.work-ai::before {
  background: url("assets/work-ai-automation.png") center 48% / cover no-repeat;
}

.work-enterprise::before {
  background: url("assets/work-enterprise.png") center 52% / cover no-repeat;
}

.work-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
}

.work-card p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 10px;
  line-height: 1.55;
}

.credentials {
  padding: 22px 0;
}

.credentials-layout {
  align-items: center;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.credentials-grid p {
  min-height: 58px;
  margin: 0;
  padding: 4px clamp(25px, 3vw, 42px);
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, .42);
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.5;
}

.closing {
  position: relative;
  overflow: hidden;
}

.closing-lines {
  position: absolute;
  inset: 0;
  opacity: .26;
  background:
    linear-gradient(155deg, transparent 25%, #bfc1c3 25.1%, transparent 25.3%),
    linear-gradient(25deg, transparent 45%, #c6c7c8 45.1%, transparent 45.3%),
    linear-gradient(155deg, transparent 66%, #d0d1d2 66.1%, transparent 66.3%);
}

.closing-inner {
  position: relative;
  min-height: 133px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.closing h2 {
  margin: 0;
  transform: translateY(6px);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.55;
  font-weight: 500;
}

.site-footer {
  color: #fff;
  background: #060708;
}

.footer-grid {
  min-height: 108px;
  display: grid;
  grid-template-columns: 350px 300px 1fr;
  gap: 26px;
  align-items: center;
}

.footer-brand {
  padding-left: 0;
  gap: 14px;
}

.footer-brand .brand-symbol {
  color: #fff;
  filter: none;
}

.footer-brand .brand-copy strong {
  font-size: 12px;
  letter-spacing: 5px;
}

.footer-brand .brand-copy small {
  color: rgba(255, 255, 255, .72);
  font-size: 6px;
}

.footer-brand .brand-divider {
  background: rgba(255, 255, 255, .38);
}

.footer-legal {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .58);
  font-size: 10px;
  line-height: 1.75;
}

.footer-legal p {
  margin: 0;
}

.footer-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: 16px;
}

.footer-policy a {
  color: rgba(255, 255, 255, .88);
  font-size: 11px;
  font-weight: 600;
}

.footer-policy a:first-child {
  color: #fff;
}

.site-footer address,
.office {
  min-height: 55px;
  margin: 0;
  font-size: 11px;
  line-height: 1.9;
  font-style: normal;
}

.site-footer address {
  display: grid;
  grid-template-columns: 36px 1px 1fr;
  column-gap: 14px;
  grid-template-rows: repeat(3, auto);
}

.office {
  display: grid;
  grid-template-columns: 36px 1px 1fr;
  column-gap: 14px;
}

.site-footer address::before,
.office::before {
  content: "";
  grid-column: 2;
  grid-row: 1 / -1;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, .3);
}

.site-footer address b,
.office b {
  grid-column: 1;
  font-size: 9px;
}

.site-footer address a,
.office span {
  grid-column: 3;
}

.site-footer address b:nth-of-type(1),
.site-footer address a:nth-of-type(1) {
  grid-row: 1;
}

.site-footer address b:nth-of-type(2),
.site-footer address a:nth-of-type(2) {
  grid-row: 2;
}

.site-footer address b:nth-of-type(3),
.site-footer address a:nth-of-type(3) {
  grid-row: 3;
}

.office b,
.office span {
  grid-row: 1;
}

@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    padding: 28px 0;
  }

}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr 86px;
    padding: 0;
  }

  .desktop-nav,
  .header-cta {
    display: none;
  }

  .desktop-nav.is-open {
    position: absolute;
    top: 86px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 16px var(--side);
    background: #fff;
    border-bottom: 1px solid #ddd;
  }

  .desktop-nav.is-open a {
    width: 100%;
    padding: 13px 0;
  }

  .desktop-nav.is-open .nav-group {
    width: 100%;
    height: auto;
    display: block;
  }

  .desktop-nav.is-open .nav-trigger {
    display: block;
    width: 100%;
    padding: 13px 0;
    text-align: left;
  }

  .desktop-nav.is-open .nav-submenu {
    position: static;
    width: 100%;
    display: none;
    padding: 0 0 10px 16px;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .desktop-nav.is-open .nav-group:hover .nav-submenu,
  .desktop-nav.is-open .nav-group:focus-within .nav-submenu,
  .desktop-nav.is-open .nav-group.is-expanded .nav-submenu {
    display: grid;
  }

.desktop-nav.is-open .nav-submenu a {
    display: flex;
    width: 100%;
    gap: 5px;
    align-items: flex-start;
    padding: 8px 0;
    white-space: normal;
  }

  .menu-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 0;
    border: 0;
    border-left: 1px solid #eee;
    background: #fff;
  }

  .menu-button span {
    display: block;
    width: 24px;
    height: 1px;
    background: #090909;
  }

  .section-layout,
  .philosophy-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .vertical-rule {
    display: none;
  }

  .process-grid,
  .capabilities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 35px;
  }

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

  .work-card {
    min-height: 230px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    padding: 28px 0;
  }
}

@media (max-width: 720px) {
  :root {
    --side: 20px;
  }

  .site-header {
    height: 72px;
    grid-template-columns: 1fr 72px;
  }

  .brand {
    gap: 11px;
    padding-left: 18px;
  }

  .brand-symbol {
    width: 34px;
    height: 40px;
  }

  .brand-symbol b:first-child {
    font-size: 38px;
  }

  .brand-symbol b:last-child {
    font-size: 28px;
  }

  .brand-divider {
    height: 36px;
  }

  .brand-copy strong {
    font-size: 10px;
    letter-spacing: 3.6px;
  }

  .brand-copy small {
    font-size: 5px;
    letter-spacing: 1px;
  }

  .menu-button {
    width: 72px;
    height: 72px;
  }

  .desktop-nav.is-open {
    top: 72px;
  }

  .hero,
  .hero-inner {
    min-height: 650px;
  }

  .hero-inner {
    align-items: flex-start;
    padding-top: 70px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-art {
    top: 290px;
    right: -230px;
    width: 780px;
    height: 430px;
    opacity: .78;
    background-size: cover;
  }

  .philosophy,
  .process-section,
  .capabilities-section,
  .works-section,
  .credentials {
    padding: 40px 0;
  }

  .philosophy-copy h2 {
    font-size: 19px;
  }

  .process-grid,
  .capabilities-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .process-grid li,
  .capabilities-grid article,
  .credentials-grid p {
    padding-left: 20px;
  }

  .process-grid li:not(:last-child)::after {
    display: none;
  }

  .works-grid {
    gap: 12px;
  }

  .work-card {
    min-height: 205px;
  }

  .closing-inner {
    min-height: 180px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

}

/* Responsive v2 hardening: preserve the 1440px composition while allowing
   every intermediate viewport and browser zoom level to reflow safely. */
img,
svg {
  max-width: 100%;
}

.site-header,
.site-footer,
main > section {
  max-width: 1440px;
}

.site-footer a,
.site-footer span,
.site-footer p {
  overflow-wrap: anywhere;
}

@media (max-width: 1099px) {
  .site-header {
    height: 86px;
    grid-template-columns: minmax(0, 1fr) 86px;
    padding: 0;
  }

  .brand {
    padding-left: var(--side);
  }

  .desktop-nav,
  .header-cta {
    display: none;
  }

  .menu-button {
    display: grid;
    width: 86px;
    height: 86px;
    place-content: center;
    gap: 8px;
    padding: 0;
    border: 0;
    border-left: 1px solid #eee;
    background: #fff;
  }

  .menu-button span {
    display: block;
    width: 24px;
    height: 1px;
    background: #090909;
  }

  .desktop-nav.is-open {
    position: absolute;
    top: 86px;
    left: 0;
    right: 0;
    display: flex;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 86px);
    max-height: calc(100dvh - 86px);
    margin: 0;
    padding: 16px var(--side) 24px;
    overflow-y: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #ddd;
  }

  .desktop-nav.is-open > a,
  .desktop-nav.is-open .nav-trigger {
    display: block;
    width: 100%;
    padding: 13px 0;
    text-align: left;
  }

  .desktop-nav.is-open .nav-group {
    display: block;
    width: 100%;
    height: auto;
  }

  .desktop-nav.is-open .nav-submenu {
    position: static;
    display: none;
    width: 100%;
    padding: 0 0 10px 16px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .desktop-nav.is-open .nav-group.is-expanded .nav-submenu,
  .desktop-nav.is-open .nav-group:focus-within .nav-submenu {
    display: grid;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: 72px;
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .site-header > *,
  .brand,
  .brand-copy {
    min-width: 0;
  }

  .brand {
    width: 100%;
    max-width: 100%;
    padding-right: 10px;
  }

  .brand-copy {
    max-width: 100%;
  }

  .brand-copy strong,
  .brand-copy small {
    white-space: normal;
  }

  .brand-copy strong {
    font-size: clamp(8px, 2.55vw, 10px);
    letter-spacing: clamp(2px, .9vw, 3.6px);
    line-height: 1.15;
  }

  .brand-copy small {
    font-size: clamp(4px, 1.28vw, 5px);
    letter-spacing: clamp(.45px, .2vw, 1px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .menu-button {
    min-width: 72px;
    width: 72px;
    height: 72px;
  }

  .desktop-nav.is-open {
    top: 72px;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
  }

  .hero h1,
  .philosophy-copy h2,
  .closing h2 {
    overflow-wrap: anywhere;
  }
}
