/* =================================================================
   Wyrryn Media — shared stylesheet (used by Home, Work, Contact)
   Mobile-first: base styles target small screens, then media
   queries layer on the larger-screen layout.
   ================================================================= */

/* ---------- Design tokens (one place to change colors/spacing) ---------- */
:root {
  --white: #ffffff;
  --gray-bg: #f5f7fa;     /* light section background */
  --navy-ink: #1a2332;    /* near-black navy for headings */
  --body-text: #4a5568;   /* muted gray body copy */
  --accent: #1d3557;      /* the ONE accent — buttons/links/highlights */
  --accent-dark: #16273f; /* darker accent for hover */
  --border: #e6eaf0;
  --shadow-sm: 0 1px 3px rgba(26, 35, 50, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 35, 50, 0.08);
  --radius: 8px;
  --container: 1140px;
  --ease: 0.25s ease;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Native smooth scrolling for in-page anchor jumps. */
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--body-text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--navy-ink);
  line-height: 1.2;
  font-weight: 700;
}

p {
  max-width: 65ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--accent-dark);
}

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--gray-bg);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-bottom: 14px;
}

.section-lead {
  margin: 0 auto;
  font-size: 1.05rem;
}

.section-cta {
  text-align: center;
  margin-top: 44px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease),
    color var(--ease), box-shadow var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--accent);
}

.btn-light:hover {
  background: var(--gray-bg);
  color: var(--accent-dark);
}

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy-ink);
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-ink);
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
}

/* underline accent on the active/hovered nav item */
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Hamburger button — hidden on desktop, shown under 900px */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-ink);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 88px;
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-bg) 100%);
  text-align: center;
}

.hero-inner {
  max-width: 820px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  margin: 0 auto 36px;
  color: var(--body-text);
}

/* small "Free quote · No obligation · Live in days" line under the CTA */
.hero-reassure {
  margin: 18px auto 0;
  font-size: 0.9rem;
  color: var(--body-text);
  opacity: 0.85;
}

/* ---------- Card grid (What We Do) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: rgba(29, 53, 87, 0.08);
  color: var(--accent);
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

/* ---------- Why a website matters ---------- */
.reasons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.reason {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.reason-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.reason h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

/* ---------- Our work teaser ---------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.work-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ---------- Site-preview placeholder (stands in for screenshots) ----------
   We have no real images yet, so instead of broken <img> tags we render a
   little faux browser window: a top bar with three "traffic light" dots and
   a navy gradient "screen" with the site name centered. Reused on the Work
   page too. */
.site-preview {
  border-bottom: 1px solid var(--border);
}

.site-preview-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 11px 14px;
  background: #eef1f6;
}

.site-preview-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cdd5e0;
}

.site-preview-screen {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: linear-gradient(135deg, #2a4a73 0%, #1d3557 100%);
}

.site-preview-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-align: center;
  color: rgba(255, 255, 255, 0.96);
}

/* gentle variation between cards so they don't look identical */
.site-preview-2 .site-preview-screen {
  background: linear-gradient(135deg, #355070 0%, #1a2332 100%);
}

.site-preview-3 .site-preview-screen {
  background: linear-gradient(135deg, #1d3557 0%, #46618a 100%);
}

/* Real demo screenshots (replacing the faux screens as demos go live) */
.site-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.work-body {
  padding: 24px 26px 28px;
}

.work-body h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 12px;
}

.work-link i {
  width: 16px;
  height: 16px;
}

/* "See Our Work →" text link below the teaser grid */
.work-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.work-more-link i {
  width: 18px;
  height: 18px;
  transition: transform var(--ease);
}

.work-more-link:hover i {
  transform: translateX(4px);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--accent);
  color: var(--white);
  text-align: center;
  padding: 72px 0;
}

.cta-inner h2 {
  color: var(--white);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin-bottom: 14px;
}

.cta-inner p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 28px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  color: var(--white);
  display: inline-block;
  margin-bottom: 10px;
}

.footer-brand p {
  max-width: 360px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 22px;
  font-size: 0.85rem;
}

/* =================================================================
   RESPONSIVE — tablet and up
   ================================================================= */
@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .reasons {
    grid-template-columns: repeat(2, 1fr);
  }
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid,
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* =================================================================
   RESPONSIVE — mobile nav (under 900px the menu collapses)
   ================================================================= */
@media (max-width: 899px) {
  .nav-toggle {
    display: flex;
  }

  /* The nav drops down as a panel below the header. It's hidden until
     the hamburger adds the .open class (handled in main.js). */
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ease);
  }

  .main-nav.open {
    max-height: 320px;
  }

  .main-nav a {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
  }

  .main-nav a.active::after {
    display: none;
  }

  /* Hamburger → X animation when menu is open */
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Respect users who prefer reduced motion — turn off transforms. */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =================================================================
   SHARED INTERIOR PAGE HERO (Work + Contact)
   A lighter intro banner than the big home hero.
   ================================================================= */
.page-hero {
  padding: 84px 0 60px;
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-bg) 100%);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.page-hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--body-text);
  max-width: 640px;
  margin: 0 auto;
}

/* =================================================================
   WORK PAGE
   ================================================================= */
/* small note under the portfolio grid */
.work-note {
  text-align: center;
  margin-top: 32px;
  font-size: 0.95rem;
  color: var(--body-text);
  opacity: 0.9;
}

/* "What Every Site Includes" reuses the .reasons / .reason layout below,
   so it needs no new rules. */

/* "How It Works" numbered steps */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step-num {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 40px;
  }
}

/* =================================================================
   CONTACT PAGE
   ================================================================= */
/* Two-column layout: form on the left, small contact block on the right.
   Stacks to one column on small screens. */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  max-width: 940px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
  }
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy-ink);
  margin-bottom: 7px;
}

.form-row .req {
  color: var(--accent);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: var(--navy-ink);
  background: var(--white);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

/* clear focus state so it's obvious which field is active */
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.12);
}

.contact-form .btn {
  width: 100%;
  margin-top: 4px;
}

/* small "prefer email?" block beside the form */
.contact-aside {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
}

.contact-aside h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.contact-aside a {
  font-weight: 600;
}
