/* OXFORD Wood Co. visitor sign-in. Matches the old Visitors page (see reference/ photos).
   On charcoal, warm grey (--accent) is fine for text. Never use it for text or buttons on white. */
:root {
  --charcoal: #26282B;
  --ink: #0B0C0E;
  --accent: #D7CFC5;
  --white: #FFFFFF;
  --light: #F2F0ED;                      /* active tab and main button, as on the old page */
  --panel: rgba(255, 255, 255, .035);
  --panel-line: rgba(255, 255, 255, .14);
  --field: rgba(255, 255, 255, .09);
  --field-line: rgba(255, 255, 255, .18);
  --soft: #B4B6BA;                       /* placeholders, hints, body copy; AA on charcoal */
  --error: #FF9C94;                      /* light red that reads on charcoal */

  --radius: 8px;
  --tap: 56px;                           /* min tap target, brief asks for at least 48px */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--charcoal); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--font);
  font-size: 19px;
  line-height: 1.45;
}

[hidden] { display: none !important; }

/* Logo, top left */
.brand {
  padding: 28px 40px 0;
  padding-top: max(28px, env(safe-area-inset-top));
}
.brand__logo { height: 50px; width: auto; display: block; }

main {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 32px 56px;
}

/* Intro */
.hero { text-align: center; margin: 0 auto 40px; max-width: 620px; }
.eyebrow {
  margin: 0 0 10px;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 14px;
  font-size: 2.4rem;
  line-height: 1.15;
  font-weight: 600;
}
.lead { margin: 0; font-size: 1.05rem; color: var(--soft); }

.icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sign In / Sign Out toggle */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, .18);
  border-radius: var(--radius);
}
.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-weight: 500;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tab[aria-selected="true"] { background: var(--light); color: var(--charcoal); }

/* Form panel */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 28px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }

label {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

input[type="text"], input[type="email"] {
  min-height: var(--tap);
  width: 100%;
  padding: 10px 16px;
  font: inherit;
  font-size: 1.15rem; /* >= 16px stops iOS zooming on focus */
  color: var(--white);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
}
input::placeholder { color: var(--soft); opacity: 1; }
input[type="text"]:focus, input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }

.signature { font-style: italic; font-size: 1.45rem; }
.hint { margin: 0; font-size: .8rem; color: var(--soft); }

/* Safety standard */
.policy {
  background: rgba(0, 0, 0, .16);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: .95rem;
  color: var(--soft);
}
.policy ul { margin: 0 0 14px; padding-left: 1.2em; }
.policy li { margin-bottom: 8px; color: var(--white); }
.policy p { margin: 0; }

.check {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--tap);
  margin-top: 22px;
  padding: 12px 18px;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 30px;
  height: 30px;
  margin: 0;
  accent-color: var(--light);
}
.check.is-invalid { border-color: var(--error); }
.check.is-invalid span { color: var(--error); }

.form-error { color: var(--error); font-weight: 600; margin: 16px 0 0; }

/* Full-width light action button */
.btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  margin-top: 20px;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--light);
  color: var(--charcoal);
  font: inherit;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { background: var(--accent); }
.btn:disabled { opacity: .7; cursor: wait; }
.btn:focus-visible, .tab:focus-visible, .check input:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.privacy {
  margin: 24px 4px 0;
  font-size: .8rem;
  color: var(--soft);
  text-align: center;
}

/* Result screens */
.message { text-align: center; padding: 48px 32px; }
.message h2 { margin: 0 0 12px; font-size: 2.4rem; line-height: 1.15; font-weight: 600; }
.message p { margin: 0; font-size: 1.2rem; color: var(--soft); }
.message .btn { max-width: 360px; margin: 36px auto 0; }

/* Honeypot: off-screen rather than display:none, which some bots skip */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Phone width */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .brand { padding: 16px 16px 0; padding-top: max(16px, env(safe-area-inset-top)); }
  .brand__logo { height: 36px; }
  main { padding: 24px 16px 32px; }
  .hero { margin-bottom: 28px; }
  h1 { font-size: 1.85rem; }
  .panel { padding: 18px; }
  .grid { grid-template-columns: 1fr; }
  .policy { padding: 14px 16px; }
  .message { padding: 36px 18px; }
  .message h2 { font-size: 2rem; }
}
