/* Millian Group · milliangroup.com */

:root {
  --paper: #F6F4EF;
  --tint: #ECE9E1;
  --ink: #14171A;
  --ink-2: #4A5057;
  --line: rgba(20, 23, 26, 0.16);
  --accent: #1F5A44;

  /* dark bands (hero and closing) */
  --band: #14171A;
  --band-ink: #F6F4EF;
  --band-ink-2: #B4B9BF;
  --band-line: rgba(246, 244, 239, 0.18);
  --band-accent: #8CC9A8;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --split: minmax(0, 1.15fr) minmax(0, 0.85fr);
  --split-gap: clamp(40px, 7vw, 104px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1113;
    --tint: #15181B;
    --ink: #ECE9E2;
    --ink-2: #A3A8AE;
    --line: rgba(236, 233, 226, 0.16);
    --accent: #8CC9A8;

    --band: #1A1D21;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--paper); }

[id] { scroll-margin-top: 24px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Dark bands: everything inside picks up the light-on-dark colors */

.band {
  --ink: var(--band-ink);
  --ink-2: var(--band-ink-2);
  --line: var(--band-line);
  --accent: var(--band-accent);
  background: var(--band);
  color: var(--ink);
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: clamp(20px, 3vw, 32px);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark:hover { color: inherit; }

.site-nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-size: 0.9375rem;
}
.site-nav a {
  padding-block: 6px;
  text-decoration-color: transparent;
}
.site-nav a:hover { text-decoration-color: var(--accent); }

/* Hero */

.band--hero {
  position: relative;
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: var(--split);
  gap: var(--split-gap);
  align-items: center;
  padding-block: clamp(48px, 10vh, 112px) clamp(72px, 14vh, 152px);
}

.hero__copy { position: relative; z-index: 1; }

.hero__sectors {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
}
.hero__sectors span { margin-inline: 0.35em; color: var(--ink-2); }

h1 {
  margin-top: clamp(16px, 2.4vw, 28px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 1rem + 5.2vw, 4.875rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.lead {
  margin-top: clamp(20px, 3vw, 32px);
  max-width: 33em;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero__mark {
  justify-self: end;
  width: min(100%, 440px);
  color: var(--ink);
}
.hero__mark svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.mark__ring { transform-origin: 200px 200px; }
.mark__dot { fill: var(--accent); }

/* Sections */

.section { padding-block: clamp(56px, 9vw, 112px); }

.section + .section { position: relative; }
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

.label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-2);
}
.label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* About */

.about__grid {
  display: grid;
  grid-template-columns: var(--split);
  gap: clamp(24px, 5vw, 80px);
  margin-top: clamp(24px, 3.5vw, 40px);
}

.statement {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.about__body { color: var(--ink-2); }
.about__body p + p { margin-top: 1em; }
.about__body p { text-wrap: pretty; }

/* What we do */

.areas { margin-top: clamp(20px, 3vw, 32px); }

.areas li {
  display: grid;
  grid-template-columns: var(--split);
  gap: 8px clamp(24px, 5vw, 80px);
  align-items: baseline;
  padding-block: clamp(22px, 3vw, 32px);
  border-top: 1px solid var(--line);
}
.areas li:last-child { padding-bottom: 0; }

.areas h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.012em;
}
.areas p {
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Values */

.tint { background: var(--tint); }

.values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
  margin-top: clamp(24px, 3.5vw, 40px);
}
.values li {
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}
.values h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.008em;
}
.values p {
  margin-top: 10px;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Closing band: contact and footer */

.contact {
  display: grid;
  grid-template-columns: var(--split);
  gap: 20px var(--split-gap);
  align-items: end;
  padding-block: clamp(56px, 9vw, 112px) clamp(48px, 7vw, 88px);
}

.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.contact__label {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.contact__email {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 32px;
  padding-block: 24px 32px;
  position: relative;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}
.site-footer a { text-decoration-color: transparent; }
.site-footer a:hover { text-decoration-color: var(--accent); }

/* 404 */

.notfound { padding-block: clamp(64px, 16vh, 176px); }

/* Tablets */

@media (max-width: 980px) {
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Narrow screens */

@media (max-width: 860px) {
  .hero,
  .about__grid,
  .areas li,
  .contact { grid-template-columns: minmax(0, 1fr); }

  .hero { padding-bottom: 168px; }

  /* the mark drops below the copy, bleeding off the lower right corner */
  .hero__mark {
    position: absolute;
    right: -120px;
    bottom: -172px;
    width: 320px;
    opacity: 0.6;
  }

  .contact { align-items: start; }
}

/* Phones: the page is short, so the header keeps only Contact (one clean row) */

@media (max-width: 560px) {
  .site-nav a:not(:last-child) { display: none; }
  .site-nav a { padding-block: 10px; }
  .values { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Load-in: copy rises once, the mark's tick ring settles into place */

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero__mark svg { animation: fade 1.1s ease-out 0.15s both; }
  .mark__ring { animation: settle 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
}

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

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}
@keyframes fade {
  from { opacity: 0; }
}
@keyframes settle {
  from { transform: rotate(-24deg); }
}
