/* inheart — editorial homepage */

:root {
  --ink: #111111;
  --muted: #555555;
  --faint: #888888;
  --line: rgba(0, 0, 0, 0.1);
  --line-hair: rgba(0, 0, 0, 0.07);
  --bg: #ffffff;
  --dark: #0d0d12;
  --pad: clamp(1.5rem, 5vw, 3.5rem);
  --font: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body.page-editorial {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border-right: 1px solid var(--ink);
  -webkit-font-smoothing: antialiased;
}

body.page-editorial a { color: inherit; text-decoration: none; }
body.page-editorial ul { margin: 0; padding: 0; list-style: none; }
body.page-editorial img { display: block; max-width: 100%; height: auto; }
body.page-editorial button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.ed-wrap {
  width: 100%;
  padding-inline: var(--pad);
  container-type: inline-size;
}

/* nav — reference */

.ed-nav {
  position: relative;
  z-index: 100;
  background: var(--bg);
}

.ed-nav__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 64px;
}

.ed-nav__logo {
  justify-self: start;
  color: var(--ink);
}

.ed-nav__logo-svg {
  display: block;
  width: 32px;
  height: auto;
}

.ed-nav__center {
  display: none;
  justify-self: center;
  gap: 2.75rem;
}

.ed-nav__center a {
  font-size: 14px;
  font-weight: 400;
  color: #b8b8b8;
  transition: color 0.2s;
}

.ed-nav__center a:hover { color: var(--ink); }

.ed-nav__center a.is-active {
  color: var(--ink);
  font-weight: 500;
}

.ed-nav__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  justify-self: end;
}

.ed-nav__sig {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.ed-nav__menu {
  position: relative;
}

.ed-nav__menu summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  padding: 0.5rem 0;
}

.ed-nav__menu summary::-webkit-details-marker { display: none; }

.ed-nav__bar {
  display: block;
  height: 1.5px;
  background: var(--ink);
}

.ed-nav__bar--long { width: 22px; }
.ed-nav__bar--short { width: 14px; }

.ed-nav__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.ed-nav__panel a {
  display: block;
  padding: 0.625rem 0.75rem;
  font-size: 14px;
}

@media (min-width: 960px) {
  .ed-nav__inner {
    grid-template-columns: 1fr auto 1fr;
  }

  .ed-nav__center { display: flex; }
  .ed-nav__menu { display: none; }
}

/* hero — architect overlap */

.ed-arch {
  position: relative;
  min-height: calc(100svh - 64px);
  overflow: clip;
}

.ed-arch__stage {
  position: relative;
  min-height: calc(100svh - 64px);
  padding-top: clamp(0.5rem, 2vh, 1.5rem);
}

.ed-arch__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(4.5rem, 17.8vw, 14.5rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.05em;
  pointer-events: none;
}

.ed-arch__title-track {
  display: flex;
  justify-content: space-between;
  width: 100%;
  white-space: nowrap;
}

.ed-arch__title-track > span {
  display: inline-block;
  flex: 0 0 auto;
}

.ed-arch__visual {
  position: absolute;
  left: 50%;
  bottom: clamp(5rem, 17vh, 10.5rem);
  transform: translateX(-50%);
  width: min(96%, 1120px);
  margin: 0;
  z-index: 3;
  pointer-events: none;
}

.ed-arch__visual img {
  width: 100%;
  height: auto;
  max-height: min(58vh, 620px);
  object-fit: contain;
  object-position: center bottom;
}

.ed-arch__notes {
  position: absolute;
  left: var(--pad);
  bottom: clamp(2rem, 7vh, 5.5rem);
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 11rem;
}

.ed-arch__notes p {
  margin: 0;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
}

.ed-arch__plus {
  flex-shrink: 0;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
}

@media (min-width: 700px) {
  .ed-arch__notes {
    grid-template-columns: 1fr 1fr;
    max-width: min(46%, 520px);
    gap: clamp(2rem, 5vw, 3.5rem);
  }

  .ed-arch__notes p {
    font-size: 13px;
  }
}

@media (max-width: 699px) {
  .ed-arch__visual {
    width: 108%;
    bottom: clamp(6rem, 22vh, 10rem);
  }

  .ed-arch__title {
    font-size: clamp(3.25rem, 15vw, 5rem);
    letter-spacing: -0.03em;
  }

  .ed-arch__notes {
    max-width: 9.5rem;
  }
}

/* banner — coding strip */

.ed-banner {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  line-height: 0;
}

.ed-banner__img {
  width: 100%;
  height: auto;
  display: block;
}

/* about */

.ed-about {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line-hair);
}

.ed-display {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 22ch;
}

.ed-display--sm {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  max-width: 14ch;
}

.ed-about__cols {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-width: 52rem;
}

.ed-about__cols p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

@media (min-width: 700px) {
  .ed-about__cols {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.ed-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 3.5rem;
  padding-block: 0.25rem;
  border-top: 1px solid var(--line-hair);
  border-bottom: 1px solid var(--line-hair);
}

.ed-stat {
  padding: 1.75rem 2rem 1.75rem 2rem;
  border-bottom: 1px solid var(--line-hair);
}

.ed-stat:nth-child(odd) {
  border-right: 1px solid var(--line-hair);
  padding-left: 0;
}

.ed-stat:nth-child(even) {
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
}

.ed-stat__num {
  display: block;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.ed-stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 14px;
  color: var(--muted);
}

@media (min-width: 800px) {
  .ed-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .ed-stat {
    border-bottom: none;
    border-right: 1px solid var(--line-hair);
    padding: 2rem clamp(1.5rem, 3vw, 2.5rem) 2rem clamp(1.5rem, 3vw, 2.5rem);
  }

  .ed-stat:first-child {
    padding-left: 0;
  }

  .ed-stat:not(:first-child) {
    padding-left: clamp(1.5rem, 3vw, 2.5rem);
  }

  .ed-stat:last-child {
    border-right: none;
    padding-right: 0;
  }
}

/* section title */

.ed-section-title {
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.ed-section-title--lg {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 2.5rem;
}

/* accordion services */

.ed-services {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line-hair);
}

.ed-acc {
  border-bottom: 1px solid var(--line);
}

.ed-acc__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: 1.375rem 0;
  text-align: left;
}

.ed-acc__n {
  font-size: 14px;
  color: var(--faint);
}

.ed-acc__title {
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ed-acc__toggle {
  position: relative;
  width: 18px;
  height: 18px;
}

.ed-acc__toggle::before,
.ed-acc__toggle::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}

.ed-acc__toggle::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%);
}

.ed-acc__toggle::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

.ed-acc[data-open] .ed-acc__toggle::after {
  transform: translateX(-50%) scaleY(0);
}

.ed-acc__body {
  padding-bottom: 1.75rem;
}

.ed-acc__grid {
  display: grid;
  gap: 2rem;
}

.ed-acc__copy p {
  margin: 0 0 1.25rem;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 28rem;
}

.ed-acc__copy ul {
  margin-bottom: 1.5rem;
}

.ed-acc__copy li {
  position: relative;
  padding-left: 1rem;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.ed-acc__copy li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}

.ed-acc__copy li + li { margin-top: 0.35rem; }

.ed-btn-outline {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: background 0.2s, border-color 0.2s;
}

.ed-btn-outline:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--ink);
}

.ed-acc__thumb {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  max-width: 360px;
}

.ed-acc__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 800px) {
  .ed-acc__grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

/* values */

.ed-values {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line-hair);
}

.ed-values__grid {
  display: grid;
  gap: 2.5rem;
}

.ed-values__list {
  border-top: 1px solid var(--line);
}

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

.ed-value h3 {
  margin: 0 0 0.625rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ed-value p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36rem;
}

@media (min-width: 900px) {
  .ed-values__grid {
    grid-template-columns: 0.38fr 0.62fr;
    gap: 4rem;
    align-items: start;
  }

  .ed-display--sm { position: sticky; top: 5rem; }
}

/* projects — 2×2 editorial grid */

.ed-work {
  padding: 0;
  background: #ececec;
}

.ed-work__shell {
  padding: clamp(0.75rem, 2vw, 1rem);
}

.ed-work__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ed-work__card {
  display: block;
  color: inherit;
}

.ed-work__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e0e0e0;
}

.ed-work__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.65s var(--ease);
}

.ed-work__card:hover .ed-work__media img,
.ed-work__card:focus-visible .ed-work__media img {
  transform: scale(1.04);
}

.ed-work__arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #fff;
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.ed-work__dot {
  position: absolute;
  left: 36%;
  top: 54%;
  z-index: 2;
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.28);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.ed-work__card:hover .ed-work__arrow,
.ed-work__card:focus-visible .ed-work__arrow,
.ed-work__card:hover .ed-work__dot,
.ed-work__card:focus-visible .ed-work__dot {
  opacity: 1;
  transform: translateY(0);
}

.ed-work__card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.ed-work__empty {
  padding: 4rem var(--pad);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.ed-work__empty a { text-decoration: underline; }

@media (min-width: 640px) {
  .ed-work__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* footer */

.ed-footer {
  background: var(--bg);
  color: var(--muted);
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line-hair);
}

.ed-footer__grid {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-hair);
}

.ed-footer__brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.ed-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

.ed-footer__nav a {
  font-size: 14px;
  transition: color 0.2s;
}

.ed-footer__nav a:hover { color: var(--ink); }

.ed-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ed-footer__contact a {
  font-size: 14px;
}

.ed-footer__contact a:hover { color: var(--ink); }

.ed-footer__legal {
  padding-top: 1.25rem;
  font-size: 12px;
  color: var(--faint);
}

@media (min-width: 800px) {
  .ed-footer__grid {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
