/* iph.ar landing page
   No web fonts, no JS, no dependencies. Light/dark follows the OS. */

:root {
  color-scheme: light dark;

  --bg: #f6f7f9;
  --text: #1b2430;
  --muted: #586373;
  --rule: #d6dbe2;
  --accent: #1d5bbf;
  --accent-text: #ffffff;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --text: #e4e8ee;
    --muted: #9aa5b4;
    --rule: #2a323d;
    --accent: #7fa8f0;
    --accent-text: #0e1218;
  }
}

/* Base */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--sans);
}

/* One shared column for header, main and footer */
.site-header nav,
main,
footer {
  max-width: 52rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main p { max-width: 40rem; }

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

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

/* Header */

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}

.site-name {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover { color: var(--text); }

/* Hero */

#hero {
  padding-block: clamp(3rem, 10vw, 6.5rem) clamp(2.5rem, 7vw, 4.5rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.tagline {
  margin: 1rem 0 0;
  font-size: 1.25rem;
  color: var(--muted);
}

.intro {
  margin: 1.5rem 0 0;
  font-size: 1.2rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

.hero-links a:first-child {
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.hero-links a:first-child:hover { opacity: 0.9; }

/* Sections: heading in a left column, content on the right */

main > section:not(#hero) {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  column-gap: 2rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule);
}

main > section:not(#hero) > h2 {
  grid-column: 1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

main > section:not(#hero) > :not(h2) { grid-column: 2; }

section p { margin: 0 0 1em; }
section p:last-child { margin-bottom: 0; }

/* Services and projects */

article {
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--rule);
}

article:first-child { padding-top: 0; }

article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

article h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

article p {
  margin: 0;
  color: var(--muted);
}

#services .service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

#services .service-cards article {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

#services .service-cards article:first-child,
#services .service-cards article:last-child {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.project-list a {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* About facts */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem 2rem;
  margin: 1.5rem 0 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts dd {
  margin: 0;
  font-weight: 600;
}

/* Contact */

#contact p a[href^="mailto:"] {
  font-size: 1.35rem;
  font-weight: 600;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
}

/* Footer */

footer {
  padding-block: 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p { margin: 0; }

/* Narrow screens: stack heading above content */

@media (max-width: 40rem) {
  main > section:not(#hero) {
    grid-template-columns: 1fr;
  }

  main > section:not(#hero) > h2 { margin-bottom: 1rem; }
  main > section:not(#hero) > :not(h2) { grid-column: 1; }
}

@media (max-width: 32rem) {
  #services .service-cards { grid-template-columns: 1fr; }
}
