/* Kaswal Group — single-page site.
   Mobile-first. Breakpoints: 640px, 768px, 1024px, 1280px (min-width only). */

/* Source Sans 3 (SIL OFL 1.1, see /fonts/OFL.txt), self-hosted, Latin subset */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-300.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400.woff2") format("woff2");
}

:root {
  --ink: #1e1e1e;      /* headings */
  --text: #4a5056;     /* body copy */
  --muted: #8a9096;    /* labels, footer */
  --rule: #e3e6e8;     /* hairlines, input borders */
  --paper: #ffffff;
  --brand: #008ad3;    /* focus ring only; matches the KG mark */
  --gutter: 1.25rem;   /* side padding, grows at breakpoints */
  --section: 3.5rem;   /* vertical section padding, grows at breakpoints */
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 300 1rem/1.75 "Source Sans 3", "Source Sans Pro", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

h1, h2 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
p { margin: 0 0 1.25rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Buttons (pill, small caps-style label as in the original) ---------- */

.button {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  border: 1px solid #c9ced2;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.button:hover { border-color: var(--ink); }
.button-solid {
  padding: 1.05rem 2.6rem;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.button-solid:hover { background: #000; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 400;
  font-size: 1.05rem;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 6px; }
.header-link {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
}
.header-link:hover { color: var(--ink); }

/* ---------- Hero: photo on top, centered text below, at every width ---------- */

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 35%;
}
.hero-text {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--section) var(--gutter);
  text-align: center;
}
.hero-text .tagline {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.5;
}
.hero-text .button { margin-top: 1rem; }

/* ---------- Alternating photo panels ---------- */

.panel { border-bottom: 1px solid var(--rule); }
.hero { border-bottom: 1px solid var(--rule); }
.panel-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.panel-text { padding: 2.5rem var(--gutter) var(--section); }

/* ---------- How we work + contact ---------- */

.about,
.contact {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--section) var(--gutter);
}
.about { text-align: center; padding-bottom: 0; }  /* contact's top padding alone separates the two */
.about h2, .contact h2 { text-align: center; margin-bottom: 1.5rem; }

form { display: grid; gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
label { color: var(--ink); font-size: 0.85rem; font-weight: 400; }
input,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cfd4d8;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}
input:focus,
textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 138, 211, .18); }
textarea { min-height: 9rem; resize: vertical; }

.site-footer {
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- 640px: large phones ---------- */

@media (min-width: 640px) {
  :root { --gutter: 2rem; --section: 4.5rem; }
  h1 { font-size: 3rem; }
  .hero-text .tagline { font-size: 1.3rem; }
  form { grid-template-columns: 1fr 1fr; }
  .panel-image { aspect-ratio: 16 / 10; }
  .panel-text > * { max-width: 40rem; }
  .field-full { grid-column: 1 / -1; }
}

/* ---------- 768px: tablets — panels go side by side ---------- */

@media (min-width: 768px) {
  .panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .panel-image { height: 100%; aspect-ratio: auto; min-height: 22rem; }
  .panel-flip .panel-image { order: 2; }
  .panel-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem var(--gutter);
  }
}

/* ---------- 1024px: laptops ---------- */

@media (min-width: 1024px) {
  :root { --gutter: 3.5rem; --section: 5.5rem; }
  body { font-size: 1.0625rem; }
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.1rem; }
  .hero-image { aspect-ratio: auto; height: min(62vh, 40rem); }
  .panel-image { min-height: 28rem; }
  .panel-text { padding-block: 4.5rem; }
  .panel-text > * { max-width: 30rem; }
}

/* ---------- 1280px: desktops — stop growing ---------- */

@media (min-width: 1280px) {
  :root { --gutter: 5rem; }
  body { font-size: 1.125rem; }              /* 18px body; labels, buttons, header are rem-sized and stay put */
  h1 { font-size: 3.75rem; }
  h2 { font-size: 2.4rem; }
  .hero-text .tagline { font-size: 1.45rem; }

  /* contact form: same modest step up as the body text */
  .contact { max-width: 52rem; }
  form { gap: 1.5rem 1.75rem; }
  label { font-size: 1rem; }
  input, textarea { font-size: 1.125rem; padding: 0.85rem 1rem; }
  textarea { min-height: 12rem; }
  .contact .button { font-size: 0.82rem; padding: 1rem 2.4rem; }
  .panel { grid-template-columns: 1fr 1fr; min-height: 32rem; }
}
