/* ============================================================
   Servihospital — Stylesheet
   Single file, mobile-first, no preprocessor needed
   ============================================================ */

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

:root {
  --green: #018855;
  --green-deep: #016B43;
  --green-soft: #E6F4ED;
  --ink: #3C3C3C;
  --ink-soft: #6B6B6B;
  --ink-light: #9A9A9A;
  --line: #E7E7DD;
  --bg: #FFFFF5;
  --bg-soft: #F7F7EC;
  --surface: #FFFFFF;
  --ph-bg: #ECECE2;
  --ph-ink: #B0B0A2;
  --max: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --display: clamp(36px, 6vw, 76px);
  --h1: clamp(28px, 4.4vw, 50px);
  --h2: clamp(24px, 3.2vw, 38px);
  --h3: clamp(18px, 1.9vw, 22px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  font: 16px/1.55 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-weight: 600; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--green); font-weight: 700; }

p { color: var(--ink); }
a { color: var(--green); text-decoration: none; transition: opacity .2s var(--ease); }
a:hover { opacity: .7; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
img, svg { max-width: 100%; display: block; height: auto; }
button { font: inherit; }

/* Skip link for accessibility/SEO */
.skip-link {
  position: absolute; top: -100px; left: 8px;
  background: var(--green); color: #fff;
  padding: 10px 14px; border-radius: 6px;
  font-weight: 600; font-size: 14px; z-index: 200;
}
.skip-link:focus { top: 8px; opacity: 1; }

/* ============ Layout ============ */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(56px, 9vw, 110px) 0; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,245,.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { height: 48px; width: auto; }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--ink); font-size: 15px; font-weight: 500;
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover, .nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); opacity: 1; }
.nav-links a.active { color: var(--green); }
.nav-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; width: 40px; height: 40px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 6px;
  font-size: 15px; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: all .25s var(--ease);
  letter-spacing: -.01em;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); opacity: 1; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); opacity: 1; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ Eyebrows ============ */
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--green); margin-bottom: 14px;
}

/* ============ Image placeholders ============ */
.ph {
  background: var(--ph-bg);
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--ph-ink); text-align: center; padding: 20px;
  position: relative; overflow: hidden;
  aspect-ratio: 4/3;
}
.ph::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(255,255,255,.32) 14px, rgba(255,255,255,.32) 15px);
  pointer-events: none;
}
.ph svg { width: 32px; height: 32px; z-index: 1; }
.ph-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; z-index: 1; }

/* ============ Footer ============ */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 40px;
}
.footer-col h4 {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-soft); font-size: 14px; }
.footer-col a:hover { color: var(--ink); opacity: 1; }
.footer-brand { color: var(--ink-soft); font-size: 14px; line-height: 1.6; max-width: 320px; margin-top: 12px; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  color: var(--ink-light); font-size: 12px;
}
.footer-version {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Status messages ============ */
.status {
  padding: 14px 16px; border-radius: 8px; font-size: 14px;
  margin-top: 12px; display: none;
}
.status.show { display: block; }
.status.success { background: #E8F5EC; color: #1A7F3C; border: 1px solid #C8E6D0; }
.status.error { background: #FDECEA; color: #C0392B; border: 1px solid #F5C6C1; }

/* ============ Form fields (shared) ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; }
.field label .opt { color: var(--ink-light); font-weight: 400; margin-left: 4px; font-size: 12px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 13px 14px; font: inherit; color: var(--ink);
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s var(--ease);
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B6B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 38px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

/* ============ Mobile ============ */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 64px 0 0 0;
    background: rgba(255,255,245,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column; gap: 0; padding: 24px;
    transform: translateY(-100%); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: 18px 0; font-size: 17px; }
  .nav-links a::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
