/* Base styles */
:root {
  --bg: #ffe4e6; /* light pink page background */
  --text: #ffffff; /* white text */
  --muted: #ffe4e6; /* light rose for muted text */
  --brand: #ef4444; /* red-500 */
  --brand-dark: #7f1d1d; /* deeper red for hovers */
  --surface: #fff; /* white surfaces for cards */
  --surface-2: #ffd1d7; /* soft rose border */
  --ring: #fecaca; /* red-200 */
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.22); /* darker shadow on red */
  /* Responsive variables (defaults ~= Desktop) */
  --logo-size: 220px;   /* Desktop default (bigger logo) */
  --container-w: 1080px;/* Desktop default */
  --hero-min-h: 520px;  /* Desktop default */
  --hero-max-w: 620px;  /* Desktop default */
  --section-odd: #fff0f2; /* very light pink */
  --section-even: #ffd7dd; /* slightly deeper pink */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  color: #7f1d1d; /* dark red text on light pink */
  background: var(--bg);
  line-height: 1.65;
}

/* Header & navigation */
header {
  padding: 0 0.85rem; /* no vertical padding so header equals logo height */
  background: transparent; /* blend header with page */
  border-bottom: 0; /* no visual separation */
  position: static; /* do not stick on scroll */
  top: auto;
  z-index: 1;
  backdrop-filter: none; /* no sticky blur */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--logo-size); /* match header height exactly to logo */
  overflow: hidden; /* ensure header ends where logo ends */
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: 2rem; /* move logo a bit to the right */
}
.brand .logo {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
}
.brand-name {
  display: none; /* hide textual brand name in header */
}
header h1 {
  margin: 0;
  font-size: 1.75rem;
}
header .tagline {
  margin: .25rem 0 1rem;
  color: var(--muted);
  max-width: 62ch;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .5rem;
  list-style: none;
  padding: .35rem .5rem; /* slightly larger pill group padding */
  margin: 0 1rem 0 0; /* pull slightly from right edge */
  background: rgba(255, 228, 230, 0.96); /* light pink, more opaque */
  border: 1px solid #fecdd3; /* soft rose border */
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(127, 29, 29, 0.18), 0 4px 10px rgba(127, 29, 29, 0.12), inset 0 1px 0 rgba(255,255,255,0.65);
  backdrop-filter: blur(6px) saturate(120%);
  width: fit-content;
}
nav a {
  text-decoration: none;
  color: #7f1d1d; /* dark red on light pink */
  font-weight: 700;
  display: inline-block;
  padding: .45rem .9rem; /* pill size similar to reference */
  border-radius: 999px;
  transition: all .2s ease;
}
nav a:hover, nav a:focus {
  background: #fecdd3; /* slightly darker pink */
  color: #7f1d1d;
}

/* Layout */
main {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0.25rem 1rem 1rem; /* even closer to header */
}
section {
  padding: 1rem; /* tighter */
  margin: 0.35rem 0; /* even smaller vertical gap */
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
}
/* Zero top spacing on the very first section below header */
main > section:first-of-type { margin-top: 0; }
/* Alternate soft tints per block */
main > section:nth-of-type(odd) {
  background: var(--section-odd);
  border-color: #ffe8eb;
}
main > section:nth-of-type(even) {
  background: var(--section-even);
  border-color: #ffd1d7;
}
/* remove previous hard separators */
section + section {
  border-top: 0;
  padding-top: 1.25rem;
}
section h2 {
  margin-top: 0;
  font-size: 1.5rem;
  position: relative;
}
section h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: .35rem;
  background: #7f1d1d; /* dark red accent on light pink bg */
  border-radius: 2px;
}

/* Hero image */
.hero-image {
  margin: 0 auto 1rem;
  max-width: 360px; /* make image small on the page */
}
.hero-image img {
  width: 100%; /* responsive within the small container */
  height: auto;
  display: block;
  border-radius: .75rem;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow);
}

/* Two-column hero with background image */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.25fr; /* make image column larger */
  gap: 1.25rem;
  align-items: stretch;
}
.hero-text {
  padding-right: .5rem;
}
.hero-text h1 {
  margin: 0 0 .5rem;
}
.hero-text .muted {
  color: #7f1d1d; /* make year range darker */
  margin-top: .25rem;
}
.hero-media {
  /* make image bigger and portrait (vertical) */
  aspect-ratio: 3 / 4;
  min-height: var(--hero-min-h);
  width: 100%;
  max-width: var(--hero-max-w);
  justify-self: end;
  border-radius: 1rem;
  border: 1px solid var(--surface-2);
  box-shadow: var(--shadow);
  background-image: url('IMG20231128172819.jpg');
  background-size: cover;
  background-position: center;
}

/* Team grid */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.person {
  background: transparent; /* blend cards */
  border: 1px solid var(--surface-2); /* very light outline */
  border-radius: .75rem;
  padding: 1rem 1.1rem;
  box-shadow: none; /* remove heavy separation */
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column; /* equal-height feel, controls inside stack */
}
.person:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: #ffd1d7; /* soft rose highlight */
}
.person h3 {
  margin-top: 0;
  font-size: 1.05rem;
}
.person p {
  color: #334155;
}

/* Equal size bios with optional expand/collapse */
.person > p {
  margin-top: .35rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person.expanded > p {
  display: block;
  -webkit-line-clamp: initial;
  line-clamp: initial;
  overflow: visible;
}
.person .see-more {
  margin-top: .6rem;
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--surface-2);
  padding: .45rem .8rem;
  border-radius: .6rem;
  font-weight: 700;
  cursor: pointer;
}
.person .see-more:hover { background: #ffe4e6; border-color: #fecaca; }

/* Team avatars */
.person .avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--surface-2);
  box-shadow: var(--shadow);
  margin: .25rem .5rem .75rem 0;
  float: left;
}

.person::after {
  content: "";
  display: block;
  clear: both;
}

/* Services cards */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 0.25rem;
}
.service-card {
  background: #fff;
  border: 1px solid var(--surface-2);
  border-radius: .75rem;
  padding: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.service-card h3 { color: #0f172a; }
.service-card p { color: #475569; }
.service-card .service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  margin-bottom: .5rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
}
.service-card .service-icon svg { width: 22px; height: 22px; fill: currentColor; }
.service-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.service-card p { margin: 0; color: #475569; }
.service-card:hover {
  border-color: #fecaca; /* soft red highlight */
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Projects section */
.project-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .5rem 0 1rem;
}
.project-nav .pill {
  display: inline-block;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand-dark);
  text-decoration: none;
  border: 1px solid var(--surface-2);
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.project-nav .pill:hover, .project-nav .pill:focus {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-1px);
}
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.project-card {
  background: #fff;
  border: 1px solid var(--surface-2);
  border-radius: .75rem;
  padding: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative; /* allow stretched-link */
  display: flex;
  flex-direction: column; /* allow actions to stick to bottom for equal-height look */
}
.project-card .thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: .55rem;
  border: 1px solid var(--surface-2);
  box-shadow: var(--shadow);
  display: block;
  margin-bottom: .6rem;
}
.project-card h3 { color: #0f172a; }
.project-card h3 a { color: inherit; text-decoration: none; }
.project-card p { color: #475569; }
.project-card h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.project-card p {
  margin: 0;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3; /* standard property for better compatibility */
}
.project-card .card-actions { margin-top: auto; display: flex; gap: .5rem; padding-top: .65rem; }
.project-card .btn { position: relative; z-index: 2; }
.stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px; /* visually hidden label */
  overflow: hidden;
}
.project-card:hover {
  border-color: #fecaca;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Reusable UI elements for project pages */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: .6rem 1rem;
  border-radius: .6rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:focus { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--brand-dark); border: 1px solid var(--surface-2); }
.btn-outline:hover { background: #ffe4e6; border-color: #fecaca; transform: translateY(-1px); }

.breadcrumb {
  font-size: .95rem;
  color: #7f1d1d;
  margin-bottom: .75rem;
}
.breadcrumb a { color: #7f1d1d; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: .6; margin: 0 .4rem; }

.project-hero {
  background: linear-gradient(180deg, rgba(255, 228, 230, .9), rgba(255, 228, 230, .5));
  border: 1px solid var(--surface-2);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.project-hero h1 {
  margin: .25rem 0 .35rem;
}
.project-hero .subtitle { color: #7f1d1d; opacity: .9; margin-bottom: .75rem; }
.project-hero .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.project-meta .meta-card {
  background: #fff;
  border: 1px solid var(--surface-2);
  border-radius: .6rem;
  padding: .75rem .9rem;
}
.badge {
  display: inline-block;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--surface-2);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: .85rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .6rem;
}
.gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: .6rem;
  border: 1px solid var(--surface-2);
  box-shadow: var(--shadow);
}

/* Contact form */
.contact-form { 
  margin-top: 1rem; 
  padding: 1rem; 
  background: #fff; 
  border: 1px solid var(--surface-2); 
  border-radius: .75rem; 
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.contact-details address { margin-bottom: .5rem; }
.contact-details a { color: var(--brand-dark); }
.contact-form .hidden { display: none; }
.contact-form .field { margin-bottom: .9rem; }
.contact-form label { display: block; font-weight: 600; margin-bottom: .35rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  padding: .6rem .7rem;
  font: inherit;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.contact-form .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.contact-form .consent label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.contact-form .btn { 
  background: var(--brand); 
  color: #fff; 
  border: 0; 
  padding: .7rem 1rem; 
  border-radius: .6rem; 
  font-weight: 700; 
  cursor: pointer; 
}
.contact-form .btn:hover { background: var(--brand-dark); }

/* Center the Kontakt block content */
#kontakt .contact-grid {
  grid-template-columns: 1fr; /* single column */
  justify-items: center;      /* center horizontally */
}
#kontakt .contact-details {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}
#kontakt .contact-person { text-align: center; }
#kontakt address { text-align: center; }

@media (max-width: 640px) {
  .contact-form .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Footer */
footer {
  text-align: center;
  color: #000000; /* footer text in black */
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.25);
  background: linear-gradient(0deg, rgba(255,255,255,0.06), transparent);
}

footer a { color: inherit; }

/* Accessibility helpers */
a:focus {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* Lists - nicer bullets */
ul {
  padding-left: 1.2rem;
}
li::marker {
  color: var(--brand-dark);
}

/* Smooth anchor offset for sticky header */
:target::before {
  content: "";
  display: block;
  height: 0; /* no offset needed since header is not sticky */
  margin-top: 0;
  visibility: hidden;
}

/* Laptop (769–1024px) falls back to defaults above */

/* Desktop (1025–1440px) - already covered by defaults */

/* Large desktop (≥1441px) */
@media (min-width: 1441px) {
  :root {
    --logo-size: 260px;
    --container-w: 1200px;
    --hero-min-h: 600px;
    --hero-max-w: 700px;
  }
  header h1 { font-size: 2.25rem; }
}

@media (max-width: 768px) {
  header { flex-wrap: wrap; }
  .brand { width: 100%; justify-content: space-between; }
  :root {
    --logo-size: 120px;   /* mobile bigger logo */
    --container-w: 100%;
    --hero-min-h: 260px;
    --hero-max-w: 100%;
  }
  .brand .logo { width: var(--logo-size); height: var(--logo-size); }
  header { height: var(--logo-size); } /* header height equals logo height on mobile too */
  nav ul { margin-left: auto; }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-text { order: 2; padding-right: 0; }
  .hero-media { order: 1; min-height: 260px; max-width: 100%; justify-self: stretch; }
}

/* Tablet (481–768px) - refine container & hero */
@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --logo-size: 140px;  /* tablet bigger logo */
    --container-w: 720px;
    --hero-min-h: 360px;
  }
}

/* Laptop (769–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --logo-size: 200px;  /* laptop bigger logo */
    --container-w: 920px;
    --hero-min-h: 420px;
    --hero-max-w: 520px;
  }
}

/* Desktop (1025–1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  :root {
    --logo-size: 220px;  /* desktop bigger logo */
    --container-w: 1080px;
    --hero-min-h: 520px;
    --hero-max-w: 620px;
  }
}

/* Responsive grids */
.services, .projects, .team {
  display: grid;
  gap: 1rem;
}
/* Mobile: 1 col (inherited) */
@media (min-width: 481px) {
  .services, .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 769px) {
  .services, .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
