:root {
  --paper: #f6f4ef;
  --white: #ffffff;
  --ink: #1a1a18;
  --muted: #66645f;
  --line: #d9d5cc;
  --accent: #244b3f;
  --accent-soft: #e7ece8;
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

header {
  background: rgba(246, 244, 239, 0.96);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.wordmark {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.wordmark small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

nav a {
  color: #45443f;
  font-size: 0.91rem;
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--ink);
}

.hero {
  padding: 110px 0 92px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  max-width: 930px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.hero h1 {
  font-size: clamp(3.6rem, 9vw, 7.4rem);
}

.hero-copy {
  max-width: 700px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: transparent;
}

section {
  padding: 82px 0;
  border-bottom: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 72px;
}

.section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.section-intro {
  margin: 16px 0 0;
  color: var(--muted);
}

.list {
  border-top: 1px solid var(--ink);
}

.list-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.list-item .index {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.list-item h3 {
  margin: 0 0 7px;
  font-size: 1.05rem;
}

.list-item p {
  margin: 0;
  color: var(--muted);
}

.note {
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}

.fact {
  padding: 24px 24px 0 0;
}

.fact + .fact {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.fact strong {
  display: block;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.fact span {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-hero {
  padding: 84px 0 60px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(3rem, 7vw, 5.7rem);
}

.page-hero p {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.meta {
  margin-top: 22px;
  color: #79766f;
  font-size: 0.84rem;
}

.legal {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 72px;
  padding: 70px 0 96px;
}

.legal aside {
  align-self: start;
  position: sticky;
  top: 32px;
}

.legal aside strong {
  display: block;
  margin-bottom: 13px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal aside a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.legal article {
  max-width: 780px;
}

.legal article section {
  padding: 0 0 38px;
  border: 0;
}

.legal h2 {
  margin: 0 0 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
}

.legal p,
.legal li {
  color: #56544f;
}

.legal ul {
  padding-left: 20px;
}

.policy-callout {
  margin: 24px 0;
  padding: 20px 22px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: #32453d;
}

footer {
  padding: 42px 0 48px;
  background: #efede7;
}

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

.footer-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

@media (max-width: 860px) {
  .section-grid,
  .legal {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .legal aside {
    position: static;
  }

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

  .fact,
  .fact + .fact {
    padding: 22px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 650px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .nav {
    min-height: 70px;
  }


  .hero {
    padding: 78px 0 64px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  section {
    padding: 58px 0;
  }

  .list-item {
    grid-template-columns: 54px 1fr;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* CodeNile responsive navigation */

.mobile-menu {
  display: none;
}

.mobile-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
}

.mobile-menu[open] summary::after {
  content: "−";
}

.mobile-links {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: min(290px, calc(100vw - 28px));
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(26, 26, 24, 0.12);
}

.mobile-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.mobile-links a:last-child {
  border-bottom: 0;
}

.mobile-links .menu-legal {
  color: var(--muted);
  font-size: 0.85rem;
}

.mobile-menu summary:focus-visible,
.mobile-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 650px) {
  .nav {
    position: relative;
    z-index: 10;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }
}


/* CODENILE MOBILE POLISH V1 */
@media (max-width: 650px) {
  .nav {
    gap: 10px;
  }

  .brand {
    gap: 10px;
    min-width: 0;
  }

  .wordmark {
    font-size: 0.96rem;
  }

  .wordmark small {
    font-size: 0.55rem;
    letter-spacing: 0.065em;
    white-space: nowrap;
  }

  .mobile-menu summary {
    gap: 8px;
    padding: 8px 10px;
  }

  .mobile-links {
    width: min(260px, calc(100vw - 28px));
  }

  .mobile-links a {
    min-height: 44px;
  }
}


/* CODENILE SERVICES V1 */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  margin-top: 48px;
  border-top: 1px solid var(--ink);
}

.service-card {
  padding: 32px 0 42px;
  border-bottom: 1px solid var(--line);
}

.service-number {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.service-card h3 {
  margin: 18px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
}

.service-card p,
.services-cta p:not(.kicker) {
  color: var(--muted);
  max-width: 650px;
}

.service-card ul {
  margin: 22px 0 0;
  padding-left: 20px;
  color: var(--ink);
}

.service-card li {
  padding: 4px 0;
}

.services-cta .button {
  margin-top: 18px;
}

@media (min-width: 651px) and (max-width: 820px) {
  .nav {
    position: relative;
    z-index: 10;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }
}

@media (max-width: 760px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}


/* CODENILE SERVICES MOBILE POLISH V1 */
@media (max-width: 650px) {
  .page-hero {
    padding: 52px 0 54px;
  }

  .page-hero h1 {
    font-size: clamp(2.65rem, 11vw, 3rem);
    line-height: 1.02;
  }

  .page-hero .hero-actions {
    gap: 10px;
  }
}


/* CODENILE TECHNOLOGIES BRAND V1 */

@media (max-width: 650px) {
  .nav {
    gap: 10px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand .mark {
    flex-shrink: 0;
  }

  .wordmark {
    font-size: 0.85rem;
    line-height: 1.2;
    overflow-wrap: normal;
  }

  .wordmark small {
    margin-top: 4px;
    font-size: 0.48rem;
    letter-spacing: 0.04em;
    white-space: normal;
  }

  .mobile-menu {
    flex-shrink: 0;
  }

  .mobile-menu summary {
    min-height: 44px;
  }
}


/* CODENILE CONTACT V1 */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
}

.contact-intro {
  max-width: 480px;
  margin: 22px 0 28px;
  color: var(--muted);
}

.contact-email {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}


/* CODENILE PROJECTS V1 */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin-top: 48px;
  border-top: 1px solid var(--ink);
}

.project-card {
  padding: 36px 0 42px;
  border-bottom: 1px solid var(--line);
}

.project-card h3 {
  margin: 20px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.project-card > p:not(.service-number) {
  color: var(--muted);
  max-width: 490px;
}

.project-category {
  display: block;
  margin-top: 24px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
