/* =========================================================
   1. Variables
   ========================================================= */
/* Brand palette */
:root {
  --maroon: #4A0404;
  --teal: #044A4A;
  --cream: #FFFEF2;
  --ink: #2e2d2b;
  --edge: 2rem;   /* services to top edge = WhatsApp QR to bottom edge */
}

/* =========================================================
   2. Base
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  overflow: hidden;           /* page is not scrollable */
  /* All sizes below are in rem, so the whole layout scales with the window */
  font-size: clamp(13px, min(1.3vw, 2.6vh), 22px);
}

body {
  height: 100%;
  overflow: hidden;
  padding: var(--edge) 0;           /* equal distance to top and bottom edges */
  background-color: var(--cream);
  background-image:
    radial-gradient(60rem 40rem at 62% 38%, rgba(74, 4, 4, 0.07), rgba(255, 254, 242, 0) 70%),
    radial-gradient(40rem 30rem at 100% 100%, rgba(4, 74, 74, 0.08), rgba(255, 254, 242, 0) 70%);
  color: var(--ink);
  font-family: 'Lato', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--maroon); }
a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  color: var(--maroon);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  white-space: nowrap;
}

/* =========================================================
   3. Top-left: Virtual Assistant Services
   ========================================================= */
.services {
  margin-left: var(--edge);
}
.services ul {
  display: flex;                   /* items side by side, left to right */
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}
.services li {
  flex: 0 0 var(--side-w);         /* each item as wide as .whatsapp; set by indexfunction.js */
  font-size: 1rem;
  line-height: 1.35;
}

/* =========================================================
   4. Center: name, email, buttons
   ========================================================= */
.center {
  align-self: center;
  text-align: center;
  width: max-content;
  max-width: 90vw;
}
.center h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 5rem;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--maroon);
  white-space: nowrap;             /* name stays on one line */
}
.headline {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  width: 0;                        /* adds nothing to the block's width... */
  min-width: 100%;                 /* ...then matches it, which the unwrapped h1 sets */
}
.email {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 1.4rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--teal);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.email:hover { color: var(--maroon); }

.buttons {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 12px;
  background-color: var(--teal);
  color: var(--cream);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(46, 45, 43, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(46, 45, 43, 0.3);
  filter: brightness(1.12);
}

/* =========================================================
   4b. Corner accents on .center
   Top-right and bottom-left corner brackets, drawn with
   the ::before and ::after pseudo-elements.
   ========================================================= */
.center {
  position: relative;            /* anchor for the absolutely positioned corners */
  --corner-color: var(--ink);    /* corner color (#2e2d2b) */
  --corner-thickness: 2px;       /* line thickness */
  --corner-w: 12rem;             /* length of the horizontal arm */
  --corner-h: 9rem;              /* length of the vertical arm */
  --corner-gap: 1.2rem;          /* how far the corners sit outside the content */
}

/* Shared styles for both corners */
.center::before,
.center::after {
  content: "";                   /* required for pseudo-elements to render */
  position: absolute;
  width: var(--corner-w);
  height: var(--corner-h);
  pointer-events: none;          /* clicks pass through to the buttons and email */
}

/* Top-right corner: a top line + a right line */
.center::before {
  top: calc(var(--corner-gap) * -1);
  right: calc(var(--corner-gap) * -1);
  border-top: var(--corner-thickness) solid var(--corner-color);
  border-right: var(--corner-thickness) solid var(--corner-color);
  border-top-right-radius: 14px;     /* soft rounded corner; remove for a sharp one */
}

/* Bottom-left corner: a bottom line + a left line */
.center::after {
  bottom: calc(var(--corner-gap) * -1);
  left: calc(var(--corner-gap) * -1);
  border-bottom: var(--corner-thickness) solid var(--corner-color);
  border-left: var(--corner-thickness) solid var(--corner-color);
  border-bottom-left-radius: 14px;   /* soft rounded corner; remove for a sharp one */
}

/* =========================================================
   5. Bottom-right: WhatsApp QR code
   ========================================================= */
.whatsapp {
  margin-right: var(--edge);
  width: max-content;              /* as wide as the unwrapped caption */
  text-align: center;
}
.whatsapp img { display: block; margin: 0 auto; }

/* =========================================================
   6. Smaller screens: keep everything in one non-scrolling view
   ========================================================= */
@media (max-width: 800px) {
  :root { --edge: 0.8rem; }
  html { font-size: clamp(10px, min(1.9vw, 2.4vh), 14px); }
  .center h1 { font-size: 3.4rem; }
}

/* =========================================================
   7. Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* =========================================================
   8. Pull services and WhatsApp toward the .center lines
   Body becomes a 3-row grid: the middle row is the .center block,
   the outer rows share the leftover space equally, so .center stays
   vertically centered. Services sits on the top line of the corner
   brackets, WhatsApp on the bottom line.
   ========================================================= */
body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto 1fr;
}

.services {
  align-self: end;               /* bottom of services moves down toward .center */
  justify-self: start;
  margin-bottom: 1.2rem;         /* = --corner-gap: lands on the top bracket line */
}

.center {
  align-self: center;
  justify-self: center;
}

.whatsapp {
  align-self: start;             /* top of WhatsApp moves up toward .center */
  justify-self: end;
  margin-top: 1.2rem;            /* = --corner-gap: lands on the bottom bracket line */
}
