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

html,
body {
  margin: 0;
  padding: 0;
}

/* VARIABLES */
:root {
  --max-width: 1120px;
  --side-gap: 40px;
  --section-gap: 32px;
  --border-color: #ececec;
  --text-color: #222222;
  --link-color: #222222;
  --link-hover-color: #555555;
  --heading-color: #111111;
  --subheading-color: #151515;
  --accent-color: #2f2f2f;
  --muted-color: #707070;
  --soft-bg: #fafafa;
}

/* BASE TYPOGRAPHY */
html {
  font-size: 16px;
}

body {
  background: #ffffff;
  color: var(--text-color);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: -0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* MAIN PAGE WRAPPERS */
.top-header,
.top-nav,
.below-header,
.container,
.above-footer,
.footer {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--side-gap);
  padding-right: var(--side-gap);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  background: #ffffff;
}

/* REMOVE INTERNAL DUPLICATE LINES INSIDE PARTIALS */
.top-header hr,
.top-nav hr,
.below-header hr,
.container hr,
.above-footer hr,
.footer hr {
  display: none;
}

.top-header > *,
.top-nav > *,
.below-header > *,
.above-footer > *,
.footer > * {
  border-top: 0;
  border-bottom: 0;
}

/* VERTICAL SPACING */
.top-header,
.below-header,
.above-footer,
.footer {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.container {
  padding-top: 52px;
  padding-bottom: 52px;
}

.top-nav {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* SINGLE SECTION DIVIDERS */
.top-header {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.top-nav {
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.below-header {
  border-bottom: 1px solid var(--border-color);
}

.above-footer {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.footer {
  padding-top: 28px;
  padding-bottom: 28px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-left: none;
  border-right: none;
}

/* HEADER */
.top-header h1,
.top-header .site-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-transform: none;
  color: var(--heading-color);
}

.top-header a {
  color: inherit;
  text-decoration: none;
  border-bottom: 0;
}

.top-header a:hover {
  color: inherit;
  border-bottom: 0;
  opacity: 0.8;
}

/* NAVIGATION */
.top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
}

.top-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.top-nav li {
  margin: 0;
  padding: 0;
}

.top-nav a {
  display: inline-block;
  color: #222222;
  text-decoration: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 0;
  transition: opacity 0.2s ease;
}

.top-nav a:hover {
  color: #222222;
  border-bottom: 0;
  text-decoration: none;
  opacity: 0.55;
}

/* TEXT */
p {
  font-size: 1rem;
  line-height: 1.85;
  margin: 0;
  color: #2b2b2b;
}

ul,
ol {
  margin: 0;
  padding-left: 1.25rem;
}

li {
  font-size: 1rem;
  line-height: 1.8;
  color: #2b2b2b;
}

/* GLOBAL HEADING SCALE */
h1,
h2,
h3,
h4 {
  margin-top: 0;
  font-weight: 600;
  color: var(--heading-color);
}

h1 {
  font-size: 1.65rem;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.08rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* RESET ONLY HEADINGS */
main.container h1,
main.container h2,
main.container h3,
main.container h4 {
  margin-top: 0;
  font-weight: 600;
}

main.container h1 {
  font-size: 1.65rem;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--heading-color);
}

main.container h2 {
  font-size: 1.4rem;
  line-height: 1.28;
  color: var(--subheading-color);
  letter-spacing: -0.02em;
}

main.container h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--accent-color);
  letter-spacing: -0.015em;
}

main.container h4 {
  font-size: 1.08rem;
  line-height: 1.45;
  color: #3b3b3b;
  letter-spacing: -0.01em;
}

/* BASE FLOW */
main.container > * + * {
  margin-top: 22px;
}

/* EXTRA SPACE BEFORE HEADINGS */
main.container h1:not(:first-child),
main.container h2:not(:first-child),
main.container h3:not(:first-child),
main.container h4:not(:first-child) {
  margin-top: 46px;
}

/* FOOTER */
.footer p,
.footer small,
.footer div {
  margin: 0;
  color: #4a4a4a;
}

.footer small {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* LINKS */
a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 34, 34, 0.14);
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--link-hover-color);
  border-bottom: 1px solid rgba(85, 85, 85, 0.35);
}

/* HAMBURGER BUTTON */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 7px 11px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  color: #222222;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.08em;
  border-radius: 999px;
}

/* HEADER STRUCTURE */
.header h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.08;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--heading-color);
}

/* SLOGAN */
.site-slogan {
  margin-top: 12px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted-color);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

/* TWO-COLUMN AND THREE-COLUMN SUPPORT */
.two-col,
.three-col {
  display: grid;
  width: 100%;
  gap: 28px;
  margin-top: 32px;
  margin-bottom: 32px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

/* COLUMN ITEMS */
.two-col > *,
.three-col > * {
  min-width: 0;
  padding: 24px;
  margin: 0;
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: 16px;
}

/* INTERNAL SPACING INSIDE COLUMN BOXES */
.two-col > * > *:first-child,
.three-col > * > *:first-child {
  margin-top: 0;
}

.two-col > * > *:last-child,
.three-col > * > *:last-child {
  margin-bottom: 0;
}

.two-col > * + *,
.three-col > * + * {
  margin-top: 0;
}

/* OPTIONAL COLUMN VARIANTS WITHOUT BOX BORDER */
.two-col.clean > *,
.three-col.clean > * {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

/* COLUMN WRAPPERS INSIDE MAIN SECTIONS */
.below-header .two-col,
.below-header .three-col,
.container .two-col,
.container .three-col,
.above-footer .two-col,
.above-footer .three-col {
  margin-top: 0;
  margin-bottom: 0;
}

/* RESPONSIVE STACKING */
@media (max-width: 900px) {
  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --side-gap: 22px;
    --section-gap: 22px;
  }

  html {
    font-size: 15px;
  }

  .top-header h1,
  .top-header .site-title {
    font-size: 1.95rem;
  }

  .header h1 {
    font-size: 1.55rem;
  }

  .nav-toggle {
    display: block;
    margin: 0 auto 12px auto;
  }

  .top-nav {
    display: block;
    text-align: center;
  }

  .top-nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    gap: 0;
  }

  .top-nav.open ul {
    display: flex;
  }

  .top-nav li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .top-nav li:last-child {
    border-bottom: none;
  }

  .top-nav a {
    display: block;
    width: 100%;
    padding: 12px 0;
    font-size: 0.8rem;
  }

  p,
  li {
    font-size: 1rem;
  }

  main.container h1 {
    font-size: 1.48rem;
  }

  main.container h2 {
    font-size: 1.28rem;
  }

  main.container h3 {
    font-size: 1.14rem;
  }

  main.container h4 {
    font-size: 1.04rem;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 22px;
    margin-bottom: 22px;
  }

  .two-col > *,
  .three-col > * {
    padding: 18px;
    border-radius: 14px;
  }
}

@media (min-width: 900px) {
  main.container p {
    column-count: 2;
    column-gap: 44px;
  }
}