:root {
  --paper: #f7f8f3;
  --surface: #ffffff;
  --ink: #171b1f;
  --muted: #5f686b;
  --line: #dfe4dc;
  --accent: #1c7c54;
  --accent-2: #e45d43;
  --accent-3: #2f6fbd;
  --shadow: 0 18px 55px rgba(23, 27, 31, .1);
  --radius: 8px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

details {
  transition: all 0.3s ease;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.form-feedback-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  z-index: 9999;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.form-feedback-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
.feedback-content {
  max-width: 440px;
  padding: 48px 32px;
  background: var(--surface);
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.04);
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.feedback-content h3 { font-size: 26px; margin-bottom: 12px; letter-spacing: -0.01em; }
.feedback-content p { color: var(--muted); margin: 0; font-size: 16px; }
.feedback-content.is-success h3 { color: var(--accent); }
.feedback-content.is-error h3 { color: var(--accent-2); }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
}
.nav-external-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-actions a.nav-external {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 8px 18px;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
/* Blog Button - solid, premium dark pill */
.nav-actions a.nav-external[href*="post"] {
  background: var(--ink);
  color: #fff !important;
  border: 1px solid var(--ink);
  box-shadow: 0 4px 12px rgba(23, 27, 31, 0.08);
}
.nav-actions a.nav-external[href*="post"]:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(28, 124, 84, 0.25);
}
/* Admin Button - ghost premium border pill */
.nav-actions a.nav-external[href*="admin"] {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid rgba(23, 27, 31, 0.15);
}
.nav-actions a.nav-external[href*="admin"]:hover {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(23, 27, 31, 0.15);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  pointer-events: none;
}
.skip-link:focus {
  transform: translateY(0);
  pointer-events: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 86px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  padding: 8px;
  border-radius: 14px;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.nav-links a,
.admin-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 30px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover,
.admin-link:hover { 
  color: var(--ink); 
  background: rgba(23, 27, 31, .04); 
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.lang-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  padding: 4px;
  gap: 4px;
}
.lang-switch button {
  min-width: 44px;
  min-height: 34px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  width: 48px;
  height: 48px;
  position: relative;
  z-index: 101; /* Above overlay */
}
.hamburger {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: background 0.3s ease;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(8px); }

.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger::after { transform: translateY(0) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.nav-overlay:not(.is-active),
.carousel-controls.is-hidden {
  pointer-events: none !important;
}
.nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: scale(1.05);
}
.lang-switch button:hover:not([aria-pressed="true"]) {
  background: rgba(0,0,0,0.05);
}
/* Hide Google Translate completely */
.goog-te-banner-frame,
#goog-te-menu-frame,
#goog-te-menu-window,
.skiptranslate.goog-te-gadget { display: none !important; }
body { top: 0 !important; }

#main {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
  transform: translateY(0);
  filter: blur(0);
  opacity: 1;
}
#main.is-language-switching {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(4px);
}

.icon-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.icon-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.section-pad {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.services,
.work,
.process,
.faq,
.contact,
.attention {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.hero {
  min-height: calc(100svh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: center;
  gap: 56px;
  padding-top: 48px;
}
.hero-copy {
  animation: riseIn .75s ease both;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .96;
  letter-spacing: 0;
}
h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}
h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}
.hero-lead {
  max-width: 690px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 24px rgba(23, 27, 31, .15);
}
.pulse-btn {
  animation: pulseButton 2.5s infinite;
}
@keyframes pulseButton {
  0% { transform: scale(1); box-shadow: 0 8px 24px rgba(23, 27, 31, .15); }
  50% { transform: scale(1.03); box-shadow: 0 12px 32px rgba(23, 27, 31, .3); }
  100% { transform: scale(1); box-shadow: 0 8px 24px rgba(23, 27, 31, .15); }
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.primary:hover {
  background: #fff;
  color: var(--ink);
  border-color: var(--ink);
}
.btn:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 12px 32px rgba(23, 27, 31, .2);
}
.btn:active {
  transform: scale(0.96);
  box-shadow: 0 4px 12px rgba(23, 27, 31, .1);
}
.btn.ghost:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(23, 27, 31, .2);
}
.btn.ghost:active {
  transform: scale(0.96);
}

.btn.nav-cta {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: none;
}
.btn.nav-blog {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.nav-blog:hover,
.btn.nav-blog:focus-visible {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 8px 18px rgba(23, 27, 31, .16);
}
.btn.nav-admin {
  background: rgba(23, 27, 31, .06);
  color: var(--ink);
  border-color: rgba(23, 27, 31, .1);
}
.btn.nav-admin:hover,
.btn.nav-admin:focus-visible {
  background: var(--accent-3);
  color: #fff;
  border-color: var(--accent-3);
  box-shadow: 0 8px 18px rgba(47, 111, 189, .18);
}
.site-header .btn.nav-cta:hover,
.site-header .btn.nav-cta:focus-visible,
.site-footer .btn.nav-cta:hover,
.site-footer .btn.nav-cta:focus-visible {
  transform: translateY(-2px);
}
.site-header .btn.nav-blog:hover,
.site-header .btn.nav-blog:focus-visible {
  background: var(--accent-2) !important;
  color: #fff !important;
  border-color: var(--accent-2) !important;
}
.site-header .btn.nav-admin:hover,
.site-header .btn.nav-admin:focus-visible,
.site-footer .btn.nav-admin:hover,
.site-footer .btn.nav-admin:focus-visible {
  background: var(--accent-3) !important;
  color: #fff !important;
  border-color: var(--accent-3) !important;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 44px 0 0;
}
.hero-stats div {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}
.hero-stats dt {
  font-size: 22px;
  font-weight: 950;
}
.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-visual {
  display: grid;
  gap: 14px;
  animation: riseIn .85s ease .08s both;
}
.signal-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.signal-row span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
  font-size: 13px;
  transition: all 0.3s ease;
}
.signal-row span:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}
.screen-preview {
  min-height: 500px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  box-shadow: var(--shadow);
  animation: softFloat 7s ease-in-out infinite;
}
.screen-preview img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
  opacity: .82;
}
.preview-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}
.preview-copy strong { font-size: 24px; }
.preview-copy span { color: var(--muted); }
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.preview-grid a {
  min-height: 74px;
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}
.preview-grid a:first-child { background: var(--accent); }
.preview-grid a:last-child { background: var(--accent-3); }

.trust-strip {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.trust-strip span {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
  border-right: 1px solid var(--line);
}
.trust-strip span:last-child { border-right: 0; }

.section-head {
  margin-bottom: 32px;
}
.inline-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}
.text-link {
  color: var(--accent);
  font-weight: 900;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.service-grid,
.work-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 28px;
  margin-top: 48px;
}
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 24px;
}
@media (min-width: 992px) {
  .masonry-grid .work-card:nth-child(6n + 1) { grid-column: span 2; grid-row: span 2; }
  .masonry-grid .work-card:nth-child(6n + 4) { grid-column: span 1; grid-row: span 2; }
  .masonry-grid .work-card:nth-child(6n + 5) { grid-column: span 2; grid-row: span 1; }
  .masonry-grid .work-card:nth-child(6n + 6) { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 991px) and (min-width: 641px) {
  .masonry-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .masonry-grid .work-card:nth-child(4n + 1) { grid-column: span 2; grid-row: span 1; }
  .masonry-grid .work-card:nth-child(4n + 2) { grid-column: span 1; grid-row: span 2; }
  .masonry-grid .work-card:nth-child(4n + 3) { grid-column: span 1; grid-row: span 1; }
  .masonry-grid .work-card:nth-child(4n + 4) { grid-column: span 1; grid-row: span 1; }
}
@media (max-width: 640px) {
  .masonry-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
}
.pagination-controls {
  display: flex;
}
.carousel-container {
  position: relative;
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 0 52px;
}
.carousel-grid {
  display: flex !important;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  flex-wrap: nowrap;
  gap: 24px;
  padding: 4px 4px 32px 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carousel-grid::-webkit-scrollbar {
  display: none;
}
.carousel-grid .work-card {
  min-width: 320px;
  max-width: 340px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  pointer-events: auto;
}
.carousel-controls {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 20px);
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transform: translateY(-50%);
}
.carousel-controls.is-hidden {
  display: none;
}
.carousel-btn {
  position: static;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(23, 27, 31, .1);
  box-shadow: 0 12px 30px rgba(23, 27, 31, .12);
  font-size: 20px;
  font-weight: bold;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 1;
  pointer-events: auto;
}
.carousel-btn:disabled {
  opacity: .35;
  cursor: default;
  box-shadow: none;
}
.carousel-btn:disabled:hover {
  background: #fff;
  color: var(--ink);
  transform: none;
}
.carousel-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 16px 34px rgba(28, 124, 84, .22);
}

@media (max-width: 768px) {
  .carousel-container {
    padding: 0;
    overflow: hidden;
    position: relative;
  }
  .carousel-controls {
    display: flex !important;
    pointer-events: auto !important;
    position: static !important;
    transform: none !important;
    margin-top: 24px !important;
    justify-content: center !important;
    gap: 16px !important;
    z-index: 20;
  }
  .carousel-grid {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    gap: 16px !important;
    padding: 4px 4px 12px !important;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
  }
  .carousel-grid .work-card {
    width: min(86vw, 340px) !important;
    min-width: min(86vw, 340px) !important;
    max-width: min(86vw, 340px) !important;
    flex: 0 0 auto !important;
    scroll-snap-align: start !important;
  }
  .carousel-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
    pointer-events: auto;
    opacity: 1 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: var(--ink) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .carousel-btn:active {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
  }
  .carousel-btn:disabled,
  .carousel-btn:disabled:hover {
    display: none !important; /* Hide entirely if disabled on mobile to avoid confusion */
  }
}

.work-card,
.admin-panel,
.login-panel {
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .03);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.info-card {
  min-height: 260px;
  padding: 32px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}
.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .06);
}
.card-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 34px;
  border-radius: 12px;
  background: rgba(28, 124, 84, 0.08);
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
}
.info-card p,
.work-card span,
details p,
.contact-copy p,
.site-footer span {
  color: var(--muted);
}

.work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-card {
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(23, 27, 31, .12);
}
.work-card img {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  background: #e9eee6;
  transition: transform 0.3s ease;
}
.work-card:hover img {
  transform: scale(1.05);
}
.work-card .card-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px 20px;
  flex: 1 1 auto;
}
.work-card .eyebrow {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 955;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.work-card h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}
.work-card .card-excerpt {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.work-card .card-link {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  background: #fff;
  font-weight: 900;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  position: relative;
  z-index: 2;
}
.work-card .card-link:hover,
.work-card .card-link:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
}
.empty-state h3 {
  max-width: 620px;
}
.empty-state span {
  max-width: 720px;
  color: var(--muted);
}

.process-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: process;
}
.process-list li {
  counter-increment: process;
  display: grid;
  grid-template-columns: 86px 180px 1fr;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-top: 1px solid var(--line);
}
.process-list li::before {
  content: "0" counter(process);
  color: var(--accent-3);
  font-weight: 950;
  font-size: 28px;
}
.process-list strong { font-size: 22px; }
.process-list span { color: var(--muted); }

.faq-grid {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 16px;
}

details {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
details[open] {
  box-shadow: 0 12px 40px rgba(0, 0, 0, .06);
}

summary {
  position: relative;
  z-index: 3;
  padding: 24px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
  outline: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.3s ease;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  padding: 0 24px 24px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.contact {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 36px;
  align-items: start;
}
.contact-lines {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.contact-lines a {
  color: var(--ink);
  font-weight: 900;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
label { display: grid; gap: 7px; font-weight: 850; }
.full { grid-column: 1 / -1; }
input,
textarea,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  padding: 14px 18px;
  outline: 0;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}
textarea { resize: vertical; }
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(28, 124, 84, .12), inset 0 2px 4px rgba(0,0,0,0.01);
}
.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--accent);
  font-weight: 850;
}

.form-feedback-overlay { display: none; pointer-events: none; } /* Hide by default if no JS */
.form-feedback-overlay.is-visible { display: grid; pointer-events: auto; }


.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 42px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}
.site-footer div:first-child { display: grid; gap: 4px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.footer-links a {
  color: var(--muted);
  font-weight: 800;
}

.admin-body,
.login-body,
.post-body {
  min-height: 100svh;
}
.admin-main,
.login-main,
.post-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 18px;
  align-items: start;
}
.admin-panel,
.login-panel {
  padding: 18px;
}
.admin-panel h2,
.login-panel h1 {
  margin: 0 0 16px;
  font-size: 28px;
}
.admin-form {
  display: grid;
  gap: 12px;
}
.admin-subpanel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}
.admin-subpanel h3,
.admin-subpanel p {
  margin: 0;
}
.admin-subpanel p {
  color: var(--muted);
}
.admin-form .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-list {
  display: grid;
  gap: 10px;
}
.admin-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcf8;
}
.admin-item h3 {
  font-size: 18px;
  margin-bottom: 4px;
}
.admin-item p { margin: 6px 0; color: var(--muted); }
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.image-preview {
  min-height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  color: var(--muted);
  font-weight: 850;
}
.image-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}
.small-btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 850;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.small-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}
.small-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.small-btn.danger {
  border-color: #f3b5a9;
  color: #b42d19;
}
.small-btn.danger:hover {
  background: #b42d19;
  color: #fff;
}
.login-panel {
  max-width: 520px;
  margin: 7vh auto 0;
}
.login-panel .btn {
  width: 100%;
  margin-top: 12px;
}
.post-article {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 64px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0,0,0,0.03);
}
.post-back-link {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-weight: 850;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.post-back-link:hover,
.post-back-link:focus-visible {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}
.post-article .eyebrow { text-align: center; margin-bottom: 24px; }
.post-article img.hero-image {
  width: calc(100% + 128px);
  max-width: none;
  margin: 32px 0 32px -64px;
  max-height: 580px;
  object-fit: cover;
  border-radius: 0;
  border: 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.post-article h1 { 
  font-size: clamp(38px, 5vw, 62px); 
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.post-meta {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 48px;
}
.post-content {
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.8;
  color: #333;
}
.post-content p {
  color: #333;
}
.post-content h2 {
  margin: 48px 0 16px;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.01em;
}
.post-content ul {
  display: grid;
  gap: 12px;
  padding-left: 24px;
}
.post-content a { color: var(--accent); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }

@media (max-width: 768px) {
  .post-article {
    padding: 32px 24px;
    border-radius: 16px;
  }
  .post-article img.hero-image {
    width: calc(100% + 48px);
    margin: 24px 0 24px -24px;
  }
}

@media (max-width: 980px) {
  .site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
  }
  #main {
    margin-top: 90px;
  }
  .nav-shell { grid-template-columns: auto auto; }
  .nav-toggle { display: block; justify-self: end; }
  
  .nav-menu {
    position: fixed;
    top: 90px;
    left: 16px;
    right: 16px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }
  .nav-menu:not(.is-open) {
    pointer-events: none !important;
  }
  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-links,
  .nav-actions {
    display: flex;
    flex-direction: column;
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    background: transparent;
    padding: 24px;
    gap: 16px;
  }
  .nav-links {
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-radius: 0;
  }
  .nav-links a { font-size: 18px; padding: 12px; }
  .nav-actions .nav-external-wrapper {
    width: 100%;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    display: flex;
  }
  .nav-actions .nav-external-wrapper a.nav-external {
    font-size: 14px;
    padding: 8px 16px;
    min-height: 38px;
    flex: 1;
    max-width: 140px;
  }
  .nav-actions {
    align-items: center;
    padding-top: 16px;
  }
  .hero,
  .contact,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .work-grid,
  .service-grid,
  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip span:nth-child(2) { border-right: 0; }
  .trust-strip span { border-bottom: 1px solid var(--line); }
  .trust-strip span:nth-child(n+3) { border-bottom: 0; }
}

@media (max-width: 640px) {
  .section-pad { padding: 64px 0; }
  .hero { padding-top: 32px; gap: 32px; }
  .hero-stats,
  .signal-row,
  .preview-grid,
  .work-grid,
  .service-grid,
  .faq-grid,
  .contact-form,
  .admin-form .two {
    grid-template-columns: 1fr;
  }
  .screen-preview,
  .screen-preview img {
    min-height: 360px;
  }
  .carousel-grid {
    padding-bottom: 12px;
  }
  .process-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .inline-head {
    display: grid;
    align-items: start;
  }
  .site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }
  .footer-links {
    justify-content: center;
  }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .trust-strip span:last-child { border-bottom: 0; }
}

@media (hover: none), (pointer: coarse) {
  .info-card:hover,
  .signal-row span:hover {
    transform: none !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .03) !important;
  }
  .work-card:hover {
    transform: none !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .03) !important;
  }
  .work-card:hover img {
    transform: none !important;
  }
  .trust-strip span:hover {
    transform: none !important;
    background: var(--surface) !important;
    color: var(--muted) !important;
  }
  .signal-row span:hover {
    background: var(--surface) !important;
    color: var(--muted) !important;
    transform: none !important;
  }
  .btn:hover {
    transform: none !important;
  }
  .btn.ghost:hover {
    transform: none !important;
    background: transparent !important;
    color: var(--ink) !important;
  }
  .btn.primary:hover {
    background: var(--ink) !important;
    color: #fff !important;
  }
  .btn:active {
    transform: scale(0.97) !important;
  }
  .nav-links a:hover {
    transform: none !important;
    background: transparent !important;
  }
  .card-link:hover {
    transform: none !important;
  }
  details:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, .03) !important;
  }
  /* Prevent 300ms tap delay */
  a, button, summary, .work-card, .info-card, details, .lang-switch button, .btn, .card-link, input, textarea, select, label {
    touch-action: manipulation;
  }
  /* Prevent tap highlight flash causing visual jumps */
  * {
    -webkit-tap-highlight-color: transparent;
  }
  /* Prevent text selection on quick taps that cause visual jumps */
  .trust-strip span,
  .signal-row span,
  .hero-stats dt,
  .hero-stats dd,
  .card-mark,
  .eyebrow,
  .process-list li::before {
    user-select: none;
    -webkit-user-select: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
