/* Fonts */
@font-face {
  font-family: "Khand";
  src: url("Assets/fonts/Khand-Medium.woff2") format("woff2"),
       url("Assets/fonts/Khand-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Synonym";
  src: url("Assets/fonts/Synonym-Regular.woff2") format("woff2"),
       url("Assets/fonts/Synonym-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Synonym Medium";
  src: url("Assets/fonts/Synonym-Medium.woff2") format("woff2"),
       url("Assets/fonts/Synonym-Medium.woff") format("woff");
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f4f4f4;
  --text: #2d2d2d;
  --accent: #468FAF;
  --blue-dark: #013A63;
  --white: #f9feff;
  --footer-h: 56px;
  --border: color-mix(in oklab, var(--text) 15%, transparent);
  --shadow: 0 4px 14px rgba(0,0,0,.08);
  --radius: 16px;
  --focus: 2px solid var(--accent);
  --transition-fast: 180ms cubic-bezier(.2,.7,.3,1);
  --transition-panel: 420ms cubic-bezier(0, 0, 0.2, 1); /* standard decelerate */
}

/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

html {
  overflow: hidden; /* non-scroll page */
}

body {
  font-family: "Synonym", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.page {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: 100vh;
  padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom));
}

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "left right";
  height: 100%;
  min-height: inherit;
  align-items: stretch;
  position: relative; /* for divider line */
}

.split::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 70%;
  background: #dedede; /* light grey divider */
  pointer-events: none;
  z-index: 5;
}

.pane {
  position: relative;
  padding: clamp(16px, 2.2vw, 36px);
}

.pane-left {
  grid-area: left;
  display: grid;
  grid-template-rows: 1fr auto;
}

.pane-right {
  grid-area: right;
  overflow: hidden;
}

.copy {
  align-self: center;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
  text-align: left; /* centered box, left-aligned text */
}

.headline {
  font-family: "Khand", system-ui, sans-serif;
  letter-spacing: .01em;
  margin: 0 0 clamp(8.5px, 1.19vw, 15.3px); /* 15% tighter spacing */
  font-size: clamp(36px, 4.6vw, 64px);
  color: var(--text);
}

.subtext {
  margin: 0;
  font-family: "Synonym", system-ui, sans-serif;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 400;
  color: var(--text);
}

.contact-inline {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-family: "Synonym Medium", "Synonym", system-ui, sans-serif;
  font-size: inherit;
  line-height: inherit;
  color: var(--blue-dark);
  font-weight: normal; /* pre-weighted font */
  cursor: pointer;
  text-decoration: none;
  vertical-align: baseline;
}

.contact-inline:focus-visible {
  outline: var(--focus);
  border-radius: 4px;
}

.contact-inline:hover {
  text-decoration: underline;
}

.logo-area {
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 48px);
}

.logo {
  width: min(80%, 820px);
  max-height: 60vh;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  aspect-ratio: 1975.31 / 466.5;
}

.contact-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: var(--footer-h); /* do not overlap the footer */
  background: var(--bg); /* site background grey */
  border-left: 1px solid var(--border); /* restore border */
  transform-origin: right center;
  transform: translate3d(100%, 0, 0);
  opacity: 0;
  transition: transform var(--transition-panel), opacity 300ms cubic-bezier(0, 0, 0.2, 1);
  display: grid;
  grid-template-rows: auto 1fr;
  z-index: 30;
  box-shadow: var(--shadow);
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
}

.contact-panel.open {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.contact-title {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
}

.contact-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-logo-sq {
  inline-size: 50px; /* +15% */
  block-size: 50px;  /* +15% */
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  aspect-ratio: 996.67 / 747.07;
}

.close-panel {
  appearance: none;
  border: none;
  background: transparent;
  inline-size: 48px; /* +20% */
  block-size: 48px;  /* +20% */
  font-size: 1.2em;  /* enlarge the × glyph */
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
}

.close-panel:focus-visible {
  outline: var(--focus);
}

.contact-form {
  padding: clamp(14px, 2.4vw, 28px);
  overflow: auto; /* the panel may scroll internally if needed */
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Phone grouped inputs */
.phone-field .optional {
  margin-left: 8px;
  font-weight: 400;
  color: #777;
  font-size: 12px;
}
.phone-inputs {
  display: grid;
  grid-template-columns: minmax(44px, 68px) 1fr;
  gap: 12px;
}
#ext {
  text-align: center;
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input,
textarea {
  font: inherit;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}

.hint {
  margin: 0;
  font-size: 12px;
  color: #666;
}

.error {
  margin: 0;
  min-height: 1.2em;
  font-size: 12px;
  color: #b00020;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.submit {
  padding: 12px 18px;
  border-radius: 10px;
  background: transparent; /* handled by pseudo-element */
  color: var(--white);
  border: none;
  cursor: pointer;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  position: relative;
  overflow: visible;
}

.submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.submit:active {
  transform: translateY(0);
}

.submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 10px;
  transform: skewX(-9deg);
  z-index: -1;
}

.form-status {
  margin-top: 10px;
  font-size: 14px;
}

/* Hide honeypot field */
.hp-field {
  display: none !important;
}

/* Footer */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  background: color-mix(in oklab, var(--bg) 96%, #ffffff);
  border-top: 1px solid #e6e6e6;
  height: var(--footer-h);
}

.footer-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(14px, 2vw, 28px);
}

.footer-left { justify-self: start; }
.footer-center { justify-self: center; }
.footer-right { justify-self: end; }

.copyright {
  margin: 0;
  color: #666;
  font-size: 12px;
}

/* Mobile layout */
@media (max-width: 767.98px) {
  .split {
    grid-template-columns: 1fr;
    grid-template-areas:
      "right"
      "left";
    grid-template-rows: auto 1fr; /* logo on top, text area fills remaining */
  }
  .split::before { display: none; }

  .pane-left {
    padding-top: 0;
    grid-template-rows: 1fr; /* single row */
    align-content: center;   /* center .copy vertically */
  }

  .logo-area {
    height: auto; /* do not occupy full height on mobile */
    padding: clamp(10.8px, 3.6vw, 21.6px); /* 10% tighter padding */
    border-bottom: 1px solid #e6e6e6; /* accent line under header */
  }

  .logo {
    width: min(60.5vw, 483px); /* ~7% smaller than before */
    max-height: 24vh;
  }

  /* Visually lift the text area a bit for better balance */
  .pane-left .copy {
    transform: translateY(-10vh);
  }

  /* Mobile-only: slightly larger text */
  .headline {
    font-size: clamp(28px, 6vw, 44px);
  }
  .subtext {
    font-size: clamp(16px, 4.2vw, 22px);
  }



  .contact-panel {
    /* full-screen overlay on mobile */
    position: fixed;
    inset: 0;
    border-left: none;
    border-top: 1px solid var(--border); /* restore mobile top border */
    transform: translate3d(0, 100%, 0);
  }

  .contact-panel.open {
    transform: translate3d(0, 0, 0);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}