/* =========================================================
   darylharkin.net — styles.css (refactored)
   - Font & variables
   - Resets & globals
   - Layout: nav, main, footer
   - Sections: hero, about, services, work, contact
   - Components: buttons, testimonials, cookie banner, embeds
   - Utilities & responsive tweaks
   ========================================================= */

/* ---------------------------
   Font & CSS Variables
---------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300&display=swap');

:root {
  --primary-color: #002147;
  --secondary-color: #00A86B;
  --text-color: whitesmoke;
}

/* ---------------------------
   Resets & Globals
---------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Roboto Mono', monospace;
  color: var(--text-color);
  background: var(--primary-color); /* default background fall-back */
}

ul { list-style: none; margin: 0; padding: 0; }
a { color: var(--text-color); text-decoration: none; }
a:hover { color: var(--secondary-color); }

img { max-width: 100%; height: auto; display: block; }

/* Headings & text */
h1, h2 { margin: 0 0 10px 0; line-height: 1.15; }
h1 { text-align: center; font-size: 30px; }
h2 { font-size: 30px; }
p  { margin: 0 0 20px 0; font-size: 20px; color: var(--text-color); }

/* ---------------------------
   Layout: Nav, Main, Footer
---------------------------- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 0;
  width: 100%;
  position: relative;
  z-index: 1000;
}
.navbar .container { display: flex; gap: 20px; padding-right: 20px; }
.navbar ul { display: flex; gap: 30px; }

/* --- FIX: navbar logo back in flow + visible --- */
.logo-container {
  position: relative;
  width: 180px;             /* reserve horizontal space so links stay put */
  height: 60px;             /* same as navbar */
  overflow: visible;        /* allow the image to extend below if it's tall */
}

.logo-container img {
  position: absolute;
  top: 0;
  left: 0;
  height: 200px;            /* make it nice and prominent */
  width: auto;
  max-width: none;
  pointer-events: none;     /* clicks pass through if it overlaps */
}

/* scale the logo down a bit on small screens */
@media (max-width: 600px) {
  .logo-container { width: 140px; }
  .logo-container img { height: 110px; }
}

main {
  /* if you intentionally pulled content up under the nav previously, keep the offsets */
  margin-top: -60px;
  margin-bottom: -60px;
}

/* Footer */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20vh;
  background-color: slategrey;
  color: var(--primary-color);
  font-size: 5rem;
}
footer a { color: var(--secondary-color); }
footer a:hover { color: var(--primary-color); }

/* ---------------------------
   Sections (shared)
---------------------------- */
section {
  padding: 50px 60px;
}

#about, #work {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

#services, #contact {
  background-color: var(--primary-color);
  color: var(--text-color);
}

#about h1, #about h2,
#work h1,  #work h2 { color: var(--primary-color); }

#services h1, #services h2,
#contact  h1, #contact  h2 { color: var(--secondary-color); }

/* ---------------------------
   Hero
---------------------------- */
#hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background-color: var(--primary-color);
  align-items: center;
  justify-content: center;
}

#hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--secondary-color);
  font-size: clamp(36px, 10vw, 100px);
  line-height: 1;
  transform: rotate(2deg);
}

#hero-text2 {
  font-size: clamp(18px, 3.5vw, 35px);
  color: whitesmoke;
  margin-top: 40px;
}

/* ---------------------------
   About / Services / Work / Contact
---------------------------- */
#services {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-around;
}

#work {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#work img { max-width: 300px; }
#examples-container,
#embedder-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  gap: 24px;
}

#contact { min-height: 100vh; }

/* ---------------------------
   Buttons (shared)
---------------------------- */
.button {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border: 5px solid var(--secondary-color);
  border-radius: 30px;
  color: var(--text-color);
  background-color: transparent;
  transition: background-color 0.3s, color 0.3s, transform 0.15s ease;
}
button:hover  { background-color: var(--secondary-color); }
button:active { background-color: white; color: var(--primary-color); transform: translateY(1px); }

#contact-submit {
  border: 5px solid var(--secondary-color);
}
#contact-submit:hover  { background-color: var(--secondary-color); }
#contact-submit:active { background-color: white; color: var(--primary-color); }

/* ---------------------------
   Audio Player (legacy class)
---------------------------- */
.audioPlayer { max-width: 300px; margin-top: 0; }

/* ---------------------------
   Testimonials
---------------------------- */
#testimonials {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
#testimonials h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
}
.testimonial {
  background-color: rgba(255,255,255,0.1);
  border: 2px solid var(--primary-color);
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto;
}
.testimonial p      { font-size: 18px; line-height: 1.5; padding-bottom: 15px; color: var(--text-color); }
.testimonial .credit{ font-size: 16px; opacity: 0.8; }

/* ---------------------------
   Contact Form (grid + tidy)
---------------------------- */
#contact form {
  display: grid;
  gap: 16px;
}

/* prevent grid overflow + vertical stacks per field */
#contact form > * { min-width: 0; }
#contact form > div { display: flex; flex-direction: column; gap: 6px; }

/* two-column on wider screens */
@media (min-width: 820px) {
  #contact form { grid-template-columns: 1fr 1fr; }
  /* long blocks span both columns */
  #contact [aria-labelledby="need-label"],
  #contact textarea,
  #contact #form-status,
  #contact p:last-of-type { grid-column: 1 / -1; }
}

/* labels */
#contact label,
#contact #need-label {
  display: block;
  font-size: 14px;
  opacity: 0.9;
  color: var(--text-color);
}

/* inputs & textarea */
#contact input[type="text"],
#contact input[type="email"],
#contact input[type="url"],
#contact textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: var(--text-color);
  outline: none;
}

/* placeholder */
#contact ::placeholder { color: rgba(255,255,255,0.6); }

/* focus */
#contact input[type="text"]:focus,
#contact input[type="email"]:focus,
#contact input[type="url"]:focus,
#contact textarea:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(0,168,107,0.25);
}

/* --- FIX: checkbox group alignment (grid, one pair per row) --- */
/* --- CONTACT FORM CHECKBOX ALIGNMENT (tight input ↔ label) --- */
#contact [aria-labelledby="need-label"] {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;                 /* row gap   | column spacing */
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}

#contact [aria-labelledby="need-label"] input[type="checkbox"] {
  align-self: center;
  margin: 0;                     /* remove spacing around checkbox */
  accent-color: var(--secondary-color);
}

#contact [aria-labelledby="need-label"] label {
  align-self: center;
  margin: 0;
  line-height: 1.2;              /* tightens vertical feel */
}

/* button placement */
#contact #contact-submit { justify-self: start; }
@media (min-width: 820px) {
  #contact #contact-submit {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 180px;
  }
}

/* status line */
#contact #form-status {
  min-height: 22px;   /* reserve space to avoid layout jump */
  font-size: 14px;
  opacity: 0.9;
}

/* small-screen padding */
@media (max-width: 480px) {
  #contact { padding: 40px 22px; }
}

/* ---------------------------
   Cookie Banner & Embed Overlays
---------------------------- */
/* site-wide consent banner */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9999;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: rgba(0,0,0,.75);
  color: var(--text-color);
  backdrop-filter: blur(4px);
  border-top: 2px solid rgba(255,255,255,.15);
  font-size: 14px;
}
.cookie-banner .msg { opacity: .9; }
.cookie-banner button {
  border: 2px solid var(--secondary-color);
  background: transparent;
  color: var(--text-color);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.cookie-banner button:hover { background: rgba(255,255,255,.08); }

/* per-embed overlay */
.embed-wrapper { position: relative; }
.embed-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 16px;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  color: var(--text-color);
}
.embed-overlay small { opacity: .85; }
.embed-overlay button {
  border: 2px solid var(--secondary-color);
  background: transparent; color: var(--text-color);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
}

/* ---------------------------
   Utilities
---------------------------- */
.center { display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }

/* ---------------------------
   Responsive tweaks for rows that were side-by-side
---------------------------- */
@media (max-width: 900px) {
  #examples-container,
  #embedder-container { flex-direction: column; gap: 24px; }
}
/* --- Checkbox + label inline, tight spacing --- */
#contact [aria-labelledby="need-label"] {
  display: block !important;             /* kill previous flex/grid */
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}

#contact [aria-labelledby="need-label"] input[type="checkbox"],
#contact [aria-labelledby="need-label"] label {
  display: inline-block !important;
  vertical-align: middle;
  margin: 0 12px 8px 0;                  /* right gap + row spacing */
}

#contact [aria-labelledby="need-label"] input[type="checkbox"] {
  accent-color: var(--secondary-color);
  transform: translateY(0);              /* remove any previous nudge */
}

#contact [aria-labelledby="need-label"] label {
  line-height: 1.1;                      /* keeps it snug to the box */
}

/* --- Floating hero image (overlap) --- */
#hero { position: relative; overflow: visible; }

#hero-text, #hero-text2, #hero .button { position: relative; z-index: 2; }

.hero-img {
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  bottom: -20px;                 /* lets it hang into the next section a touch */
  z-index: 1;                    /* sits behind the text/button */
  pointer-events: none;          /* don’t block clicks on hero button */
}

.hero-img img {
  width: clamp(220px, 32vw, 520px);
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  transform: rotate(-2deg);
  opacity: 0;
  animation: heroIn 700ms ease-out 120ms forwards;
}

/* gentle entrance */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px) rotate(-2deg) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    rotate(-2deg) scale(1); }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-img img { animation: none; opacity: 1; }
}

/* mobile: stack the image under the text and center it */
@media (max-width: 820px) {
  .hero-img { position: static; margin-top: 28px; text-align: center; }
  .hero-img img { width: min(86vw, 520px); transform: none; }
}

/* keep hero safely below the header */
main { margin-top: 0 !important; margin-bottom: 0 !important; }

/* allow the nav list to wrap under pressure */
.navbar { display: flex; flex-wrap: wrap; align-items: center; }

/* keep the links from butting into the logo */
.navbar .container { flex: 1 1 auto; }
.navbar ul { flex-wrap: wrap; gap: 16px 24px; }

/* desktop: keep your big overhang look */
.logo-container {
  position: relative;
  width: 180px;
  height: 60px;   /* navbar height */
  overflow: visible;
}
.logo-container img {
  position: absolute;
  top: 0; left: 0;
  height: 140px;  /* big + proud */
  width: auto;
}

/* tablet & down: contain the logo so it can't collide with links/hero */
@media (max-width: 1000px) {
  .logo-container { width: 150px; height: 72px; overflow: hidden; }
  .logo-container img { position: static; height: 72px; }
}

/* phone: stack neatly, shrink a touch more */
@media (max-width: 640px) {
  .navbar { row-gap: 8px; padding: 8px 12px; }
  .logo-container { width: 140px; height: 60px; }
  .logo-container img { height: 60px; }
  .navbar .container { width: 100%; }
  .navbar ul { justify-content: flex-start; }
}

@media (max-width: 820px) {
  #hero { padding-top: 8px; }          /* small breathing room below header */
  .hero-img { position: static; margin-top: 20px; text-align: center; }
  .hero-img img { width: min(86vw, 520px); transform: none; }
}

/* input + label on same line, snug */
#contact [aria-labelledby="need-label"] { display: block !important; padding: 12px; }
#contact [aria-labelledby="need-label"] input[type="checkbox"],
#contact [aria-labelledby="need-label"] label {
  display: inline-block !important;
  vertical-align: middle;
  margin: 0 10px 8px 0;
}

/* --- NAVBAR: logo left, links stuck to the right --- */
.navbar {
  display: flex;
  justify-content: space-between; /* forces left + right positioning */
  align-items: center;
  width: 100%;
  padding: 0 24px;
  flex-wrap: nowrap;               /* stop wrapping behind logo */
}

/* force the nav container to occupy remaining space and push links to right */
.navbar .container {
  margin-left: auto;               /* pushes nav list to the right edge */
  display: flex;
  justify-content: flex-end;
  flex: 1 1 auto;
}

/* right-align the UL itself */
.navbar ul {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* keep logo from collapsing the layout */
.logo-container {
  flex-shrink: 0;                  /* don't allow logo to shrink */
}

@media (max-width: 760px) {
  .navbar {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .navbar .container {
    flex-basis: 100%;
    justify-content: flex-end;
  }

  .navbar ul {
    flex-basis: 100%;
    justify-content: flex-end;
  }
}

/* End of file */
