/*
Theme Name: MECCOM
Theme URI: https://www.meccom.de
Author: MECCOM Stathas GmbH
Description: Glasfaser. Planung, Bau, FTTH. Block theme built from the MECCOM Astro design (2026).
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 8.1
License: proprietary
Text Domain: meccom
*/

/* ---------- Fonts (self-hosted Manrope variable, no third-party requests) ---------- */
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('assets/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('assets/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('assets/fonts/manrope-greek-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

/* ---------- Tokens ---------- */
:root {
  --orange: #f26b21;
  --orange-dark: #d4551a;
  --blue: #2b4c8c;
  --blue-deep: #16294f;
  --navy: #0d1626;
  --ink: #1c1f26;
  --ink-soft: #4a4f5c;
  --line: #e3e6ec;
  --paper: #ffffff;
  --paper-soft: #f4f6f9;
  --max: 1180px;
  --radius: 14px;
  --font: 'Manrope Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 17px; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--orange-dark); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--soft { background: var(--paper-soft); }
.section--dark { background: var(--navy); color: #e8ecf3; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: #ffb08a; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin: 0 0 .8em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 48rem; }
.section--dark .lead { color: #b8c2d6; }
.grid { display: grid; gap: clamp(18px, 3vw, 32px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.mt { margin-top: 32px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Block editor/front: our sections are full width, the .wrap groups carry the max width. */
.entry-content > * { margin-block: 0; }
.wp-block-group.wrap { margin-inline: auto; }
.is-layout-flow > * + * { margin-block-start: 0; }

/* ---------- Buttons (core/button inside .btn wrapper) ---------- */
.btn, .wp-block-button.btn .wp-block-button__link {
  display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.5em; border-radius: 999px;
  font-weight: 800; font-size: 1rem; border: 2px solid transparent; cursor: pointer; line-height: 1.3;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.wp-block-button.btn .wp-block-button__link { background: none; color: inherit; }
.btn:hover, .wp-block-button.btn .wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.btn--primary .wp-block-button__link, .btn--primary:not(.wp-block-button) { background: var(--orange); color: #fff; }
.wp-block-button.btn--primary .wp-block-button__link:hover, .btn--primary:not(.wp-block-button):hover { background: var(--orange-dark); color: #fff; }
.wp-block-button.btn--ghost .wp-block-button__link, .btn--ghost:not(.wp-block-button) { border-color: rgba(255,255,255,.5); color: #fff; }
.wp-block-button.btn--ghost .wp-block-button__link:hover, .btn--ghost:not(.wp-block-button):hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.wp-block-button.btn--outline .wp-block-button__link, .btn--outline:not(.wp-block-button) { border-color: var(--blue); color: var(--blue); }
.wp-block-button.btn--outline .wp-block-button__link:hover, .btn--outline:not(.wp-block-button):hover { background: var(--blue); color: #fff; }
.wp-block-buttons { gap: 12px; }
.btn .i, .btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Cards, lists, figures ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(13,22,38,.10); }
.card--link { color: inherit; display: block; }
.card--link:hover { color: inherit; }
.card__icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), #ff9a5c); color: #fff; margin: 0 0 18px; }
.card__icon svg { width: 28px; height: 28px; display: block; }
.card h3 { margin-top: 0; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.card .more { margin-top: 14px; font-weight: 800; color: var(--orange); display: inline-flex; gap: .3em; align-items: center; }

.check { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: .55em; }
.check li { padding-left: 1.9em; position: relative; }
.check li::before { content: ''; position: absolute; left: 0; top: .42em; width: 1.15em; height: 1.15em; border-radius: 50%; background: var(--orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 1 0 0 20a10 10 0 0 0 0-20m-1.2 14.3l-4-4l1.4-1.4l2.6 2.6l5.6-5.6l1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 1 0 0 20a10 10 0 0 0 0-20m-1.2 14.3l-4-4l1.4-1.4l2.6 2.6l5.6-5.6l1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
.section--dark .check li::before { background: #ffb08a; }

.figure, .wp-block-image.figure { border-radius: var(--radius); overflow: hidden; margin: 0; box-shadow: 0 20px 50px rgba(13,22,38,.18); }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure--tall img { aspect-ratio: 4 / 5; }
.figure--wide img { aspect-ratio: 16 / 10; }
.figure figcaption, .wp-block-image.figure figcaption { font-size: .85rem; color: var(--ink-soft); padding: 10px 14px; margin: 0; background: var(--paper-soft); text-align: left; }

.split { display: grid; gap: clamp(24px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--rev > :first-child { order: 2; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 20px; }
.stat { border-left: 3px solid var(--orange); padding-left: 18px; }
.stat__value { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; font-weight: 800; color: #fff; margin: 0 0 6px; }
.stat__label { color: #b8c2d6; font-size: .95rem; margin: 0; }
.stats-sec { padding-block: 36px; }

.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.step { counter-increment: step; padding: 22px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.step::before { content: counter(step, decimal-leading-zero); display: block; font-size: 2rem; font-weight: 800; color: var(--orange); line-height: 1; margin-bottom: 12px; }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.page-hero { background: radial-gradient(1200px 500px at 80% -10%, rgba(242,107,33,.35), transparent 60%), linear-gradient(160deg, var(--navy), var(--blue-deep)); color: #fff; padding-block: clamp(64px, 10vw, 120px) clamp(48px, 7vw, 88px); }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero .lead { color: #c8d1e3; }
.breadcrumb { font-size: .85rem; color: #9fb0cc; margin: 0 0 1.5em; }
.breadcrumb a { color: #c8d1e3; }

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }

.cta { background: linear-gradient(135deg, var(--orange), #ff8a3d); color: #fff; border-radius: 20px; padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta h2 { color: #fff; margin: 0 0 .3em; }
.cta p { margin: 0; color: #fff3ea; }
.cta .wp-block-button.btn--primary .wp-block-button__link, .cta a.btn--primary { background: #fff; color: var(--orange-dark); }
.cta .wp-block-button.btn--primary .wp-block-button__link:hover, .cta a.btn--primary:hover { background: var(--navy); color: #fff; }

.demo-badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7a3a10; background: #fff5ec; border: 1px dashed var(--orange); border-radius: 999px; padding: 3px 10px; margin: 0 0 1em; vertical-align: middle; }
.section--dark .demo-badge { background: rgba(242,107,33,.15); color: #ffb08a; }
.numbers { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin-top: 28px; }
.num { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; }
.num__value { font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1; color: var(--blue); font-weight: 800; font-variant-numeric: tabular-nums; margin: 0 0 8px; }
.num__label { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.spec { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.spec li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.spec li strong { color: var(--ink); font-weight: 800; display: block; }
@media (min-width: 700px) { .spec li { display: grid; grid-template-columns: 220px 1fr; gap: 4px 24px; } }

/* ---------- Home ---------- */
.hero { position: relative; color: #fff; min-height: 560px; display: grid; align-items: center; overflow: hidden; background: var(--navy); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 60%; margin: 0; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 65% 60%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,22,38,.92) 0%, rgba(13,22,38,.75) 45%, rgba(13,22,38,.25) 100%), linear-gradient(0deg, rgba(13,22,38,.7), transparent 40%); }
.hero__in { position: relative; padding-block: clamp(72px, 12vw, 140px); }
.hero h1 { color: #fff; max-width: 17ch; text-wrap: balance; }
.hero .lead { color: #d5dcea; max-width: 44rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__cap { position: absolute; right: clamp(16px, 4vw, 32px); bottom: 12px; margin: 0; font-size: .75rem; color: rgba(255,255,255,.6); }
.svc { padding: 0; display: flex; flex-direction: column; }
.svc__img { aspect-ratio: 16 / 9; overflow: hidden; margin: 0; }
.svc__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; aspect-ratio: 16 / 9; }
.svc:hover .svc__img img { transform: scale(1.04); }
.svc__body { padding: clamp(20px, 3vw, 28px); }
.map-wrap { display: grid; place-items: center; }
.map { width: 100%; height: auto; max-width: 560px; color: #e8ecf3; font-family: var(--font); }
.cities { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cities li { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 700; color: #e8ecf3; }
.cities li:first-child { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ---------- Service pages ---------- */
.block + .block { margin-top: 36px; }
.block h2 { font-size: 1.5rem; }
.pts { margin-top: 14px; }
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 24px; }
.gallery .figure img { aspect-ratio: 4 / 3; }
.aud { display: grid; gap: 22px; margin-top: 20px; }
.aud__item { display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; }
.aud__item .card__icon { margin: 0; }
.aud__item h3 { font-size: 1.1rem; margin-bottom: .3em; }
.aud__item p { color: var(--ink-soft); margin: 0; }
.timeline { display: grid; gap: 22px; margin-top: 20px; }
.tl__item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; }
.tl__year { font-weight: 800; color: var(--orange); font-size: .95rem; padding-top: 4px; margin: 0; }
.tl__item h3 { font-size: 1.1rem; margin-bottom: .25em; }
.tl__item p { color: var(--ink-soft); margin: 0; }
.values { position: relative; overflow: hidden; }
.values__bg { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.values__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .16; }
.values .wrap { position: relative; }
.val p { color: #c8d1e3; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact { grid-template-columns: 3fr 2fr; } }
.office { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--paper-soft); }
.office + .office { margin-top: 16px; }
.office h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }
.office p { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; }
.office svg { width: 20px; height: 20px; color: var(--orange); flex: none; margin-top: 3px; }
.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 500; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242,107,33,.2); }
.form__consent { grid-template-columns: auto 1fr; align-items: start; font-weight: 500; font-size: .88rem; color: var(--ink-soft); }
.form__consent input { width: 18px; height: 18px; margin-top: 3px; }
.form__hp { position: absolute; left: -9999px; }
.form__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.form__status { margin: 0; font-weight: 700; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(13,22,38,.92); backdrop-filter: blur(10px); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.hdr__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.hdr__logo img { width: 168px; height: auto; }
.hdr__nav { display: flex; align-items: center; gap: 22px; }
.hdr__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.hdr__nav ul a { color: #dfe5f0; font-weight: 700; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.hdr__nav ul a:hover { color: #fff; background: rgba(255,255,255,.08); }
.hdr__nav ul a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.hdr__lang { display: flex; gap: 2px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 3px; }
.hdr__lang a { color: #b9c3d6; font-size: .75rem; font-weight: 800; padding: 4px 8px; border-radius: 999px; }
.hdr__lang a[aria-current="true"] { background: var(--orange); color: #fff; }
.hdr__cta { padding: .6em 1.2em; font-size: .9rem; }
.hdr__burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; align-items: center; padding: 0; }
.hdr__burger span { display: block; width: 24px; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
@media (max-width: 1023px) {
  .hdr__burger { display: flex; }
  .hdr__nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); flex-direction: column; align-items: stretch; padding: 12px clamp(16px, 4vw, 32px) 24px; gap: 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .hdr__nav.open { display: flex; }
  .hdr__nav ul { flex-direction: column; }
  .hdr__nav ul a { display: block; font-size: 1.1rem; padding: 12px 8px; }
  .hdr__lang { align-self: flex-start; }
  .hdr__cta { align-self: flex-start; }
  .hdr__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hdr__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .hdr__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
body.admin-bar .hdr { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hdr { top: 46px; } }

/* ---------- Footer ---------- */
.ftr { background: var(--navy); color: #b8c2d6; padding-block: 56px 24px; }
.ftr__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (min-width: 900px) { .ftr__grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.ftr img { width: 160px; height: auto; margin-bottom: 16px; }
.ftr__about { font-size: .95rem; max-width: 36ch; }
.ftr h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ftr a { color: #dfe5f0; }
.ftr a:hover { color: #ffb08a; }
.ftr__contact li { display: flex; gap: 10px; align-items: flex-start; }
.ftr__contact svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--orange); }
.ftr__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.ftr__tag { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }

/* ---------- 404 ---------- */
.nf { padding-block: clamp(64px, 10vw, 140px); }
.nf ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card, .btn { transition: none; } }

/* arrow after buttons that had the arrow icon in the Astro design */
.btn--arrow .wp-block-button__link::after, a.btn--arrow::after { content: ''; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 11h11.17l-4.88-4.88L12.7 4.7 20 12l-7.3 7.3-1.41-1.42L16.17 13H5z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 11h11.17l-4.88-4.88L12.7 4.7 20 12l-7.3 7.3-1.41-1.42L16.17 13H5z'/%3E%3C/svg%3E") center/contain no-repeat; }
.card .more a { color: var(--orange); display: inline-flex; gap: .3em; align-items: center; }
