/* ==========================================================================
   Company one-page site — layout, typography, responsive breakpoints
   Replace [PLACEHOLDER] content in index.html when final materials arrive.
   ========================================================================== */

/* --- Design tokens --- */
:root {
  --color-bg: #eef2f6;
  --color-surface: #ffffff;
  --color-text: #15202b;
  --color-text-muted: #5a6a7a;
  --color-border: #d5dee8;
  --color-accent: #1a5f8f;
  --color-accent-hover: #134a70;
  --color-accent-soft: #e3f0f8;
  --color-copper: #c26b2d;
  --color-copper-soft: #f8efe6;
  --color-steel: #2c3e50;
  --gradient-hero: linear-gradient(135deg, #e8f1f7 0%, #f4f0eb 48%, #eef2f6 100%);
  --gradient-section: linear-gradient(180deg, #e8eef4 0%, #eef2f6 100%);
  --shadow-soft: 0 10px 30px rgba(21, 32, 43, 0.06);
  --shadow-lift: 0 14px 36px rgba(26, 95, 143, 0.12);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --container-max: 72rem;
  --narrow-max: 48rem;

  --header-height: 8rem;
}

/* --- Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(26, 95, 143, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(194, 107, 45, 0.08), transparent 50%);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 var(--space-md);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- Utilities --- */
.container {
  width: min(100% - 2 * var(--space-lg), var(--container-max));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2 * var(--space-lg), var(--narrow-max));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100%;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-md);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(26, 95, 143, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: var(--header-height);
}

.brand {
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  width: auto;
  max-height: 6.5rem;
}

.site-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  justify-content: flex-end;
}

.nav-list a {
  display: inline-block;
  padding: var(--space-sm) var(--space-xs);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  min-height: 2.75rem;
  line-height: 1.75rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Hide primary and secondary buttons as requested */
.btn.btn-primary,
.btn.btn-secondary {
  display: none !important;
}

/* --- Hero --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(22rem, 52vh, 34rem);
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: url("assets/images/banner-karhu-assets.jpeg") center / cover no-repeat;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(21, 32, 43, 0.82) 0%,
    rgba(26, 95, 143, 0.55) 50%,
    rgba(21, 32, 43, 0.7) 100%
  );
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-copper));
  z-index: 1;
}

.hero > .container {
  width: 100%;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.hero-content {
  width: 100%;
  max-width: 42rem;
  display: flex;
  flex-direction: column;
}

.hero-copy {
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.hero-content #hero-heading {
  margin-bottom: 1rem;
  text-align: center;
  color: #fff;
}

.hero-content .hero-subheading {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 500;
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  justify-content: center;
}

/* --- Sections --- */
.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--gradient-section);
  border-block: 1px solid var(--color-border);
}

.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto var(--space-2xl);
}

.section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-md);
}

.section-header h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-copper));
  transform: translateX(-50%);
}

.section-intro {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: rgba(26, 95, 143, 0.35);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.section-alt .card {
  background: var(--color-surface);
}

/* --- About --- */
.about-grid {
  display: grid;
  gap: var(--space-lg);
}

.about-grid .card {
  border-top: 3px solid var(--color-accent);
}

.about-grid .card:nth-child(2) {
  border-top-color: var(--color-copper);
}

.about-grid .card:nth-child(3) {
  border-top-color: var(--color-steel);
}

.about-grid .card h3 {
  color: var(--color-steel);
}

/* --- Services --- */
.services-list {
  display: grid;
  gap: var(--space-lg);
}

.service-item {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.service-item:hover {
  border-color: rgba(26, 95, 143, 0.35);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.service-icon {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--color-accent-soft), #fff);
  border: 1px solid rgba(26, 95, 143, 0.2);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.service-icon img {
  width: 2rem;
  height: 2rem;
}

.service-item h3 {
  margin-bottom: var(--space-xs);
  color: var(--color-steel);
}

.service-item p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* --- Contact --- */
#contact {
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(26, 95, 143, 0.08), transparent 55%),
    var(--color-bg);
}

.contact-grid {
  display: grid;
  gap: var(--space-lg);
  justify-items: center;
}

.contact-details {
  width: 100%;
  max-width: var(--narrow-max);
  text-align: center;
  border-top: 3px solid var(--color-accent);
}

.contact-subheading {
  font-size: 1rem;
  margin-bottom: var(--space-lg);
  color: var(--color-steel);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  font-style: normal;
}

.contact-list li {
  display: grid;
  gap: var(--space-xs);
  justify-items: center;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-copper);
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-2xl) 0;
  background:
    linear-gradient(90deg, var(--color-accent), var(--color-copper)) top / 100% 4px no-repeat,
    linear-gradient(160deg, #15202b 0%, #1f3344 100%);
  color: #e8e8ec;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  font-size: 0.875rem;
}

.footer-copy {
  margin: 0;
}

.footer-cofunded {
  display: block;
  width: auto;
  max-width: min(20rem, 100%);
  height: auto;
  border-radius: var(--radius-sm);
}


/* --- Responsive: tablet and up --- */
@media (min-width: 640px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid .card:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .services-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-grid .card:last-child {
    grid-column: auto;
  }
}

/* --- Responsive: small phones --- */
@media (max-width: 479px) {
  :root {
    --space-lg: 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .service-item {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .card:hover,
  .service-item:hover {
    transform: none;
  }
}
