/* ==========================================================================
   Kitchen Creek Media — app.css
   Design system and component styles
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --bg:             #ffffff;
  --bg-muted:       #f8fafc;
  --bg-dark:        #0d1b2a;
  --bg-dark-2:      #162032;

  --text:           #0f172a;
  --text-mid:       #334155;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;

  --accent:         #0d9488;
  --accent-hover:   #0f766e;
  --accent-bg:      #f0fdfa;
  --accent-glow:    rgba(13, 148, 136, 0.25);

  --border:         #e2e8f0;
  --border-dark:    #1e3a50;

  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --max-w:          1100px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.05);
  --shadow:         0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg:      0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);

  --transition:     0.18s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.125rem, 5vw, 3.375rem); }
h2 { font-size: clamp(1.625rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.0625rem, 2vw, 1.25rem); font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; }

p {
  color: var(--text-mid);
  line-height: 1.75;
}

/* ---------- Focus styles ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
}

.section--sm {
  padding: 3.5rem 0;
}

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

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

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #fff;
}

.section--dark p {
  color: var(--text-light);
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity var(--transition);
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.5rem 1.125rem !important;
  border-radius: var(--radius) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition) !important;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.nav-toggle:hover {
  background: var(--bg-muted);
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1.25rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    padding: 0.8125rem 0;
    width: 100%;
    border-bottom: 1px solid var(--bg-muted);
    font-size: 1rem;
    color: var(--text-mid) !important;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-cta {
    margin-top: 0.25rem;
    background: none !important;
    color: var(--accent) !important;
    padding: 0.8125rem 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    font-size: 1rem !important;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-dark);
  padding: 7rem 0 6.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.hero h1 {
  color: #ffffff;
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: #94a3b8;
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 2.75rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent-glow);
}

.btn-ghost {
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.06);
}

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

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Section labels & headings ---------- */
.section-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.875rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

/* ---------- Grid layouts ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: #d1dce8;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.125rem;
  color: var(--accent);
  flex-shrink: 0;
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ---------- About section ---------- */
.about-text h2 {
  margin-bottom: 1.25rem;
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 1.0625rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Portfolio placeholder ---------- */
.portfolio-placeholder {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  background: var(--bg-muted);
}

.portfolio-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--text-muted);
}

.portfolio-placeholder-icon svg {
  width: 22px;
  height: 22px;
}

.portfolio-placeholder h3 {
  margin-bottom: 0.625rem;
  color: var(--text-mid);
}

.portfolio-placeholder p {
  max-width: 380px;
  margin: 0 auto;
  font-size: 0.9375rem;
}

/* ---------- Contact CTA band ---------- */
.cta-band {
  background: var(--bg-dark);
  padding: 5rem 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-band p {
  color: #94a3b8;
  font-size: 1.0625rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.cta-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--transition);
  margin-bottom: 2rem;
}

.cta-email:hover { color: #2dd4bf; }
.cta-email svg { width: 17px; height: 17px; }

/* ---------- Page hero band ---------- */
.page-hero {
  background: var(--bg-dark);
  padding: 4rem 0 3.5rem;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: #94a3b8;
  font-size: 1.0625rem;
  max-width: 520px;
}

/* ---------- Contact page ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
}

.contact-info h2 {
  font-size: 1.375rem;
  margin-bottom: 0.875rem;
}

.contact-info p {
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  transition: color var(--transition);
  margin-bottom: 2rem;
}

.contact-email-link:hover { color: var(--accent-hover); }
.contact-email-link svg { width: 17px; height: 17px; }

.contact-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

/* ---------- Form styles ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-required {
  color: var(--accent);
  margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.6875rem 0.9375rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.form-input.is-invalid,
.form-textarea.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-field-error {
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.25rem;
  display: none;
}

.form-field-error.is-visible { display: block; }

/* Honeypot — must be invisible and not shift layout */
.form-group--honey {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  tab-index: -1;
}

.form-submit { margin-top: 0.375rem; }

.form-submit .btn {
  width: 100%;
  justify-content: center;
  padding: 0.875rem 1.5rem;
}

.form-status {
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  display: none;
}

.form-status.is-success {
  display: block;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
}

.form-status.is-error {
  display: block;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
}

/* ---------- Legal pages ---------- */
.legal-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.legal-content .legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-content h2 {
  font-size: 1.1875rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

.legal-content p {
  margin-bottom: 1rem;
  font-size: 0.9688rem;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.375rem;
  margin-bottom: 1rem;
}

.legal-content ul li {
  margin-bottom: 0.375rem;
  color: var(--text-mid);
  font-size: 0.9688rem;
  line-height: 1.65;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--accent-hover);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 3.5rem 0 2.25rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 1.75rem;
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.875rem;
}

.footer-logo-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #4e6e85;
  margin-bottom: 1.125rem;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition);
}

.footer-email:hover { color: #2dd4bf; }
.footer-email svg { width: 15px; height: 15px; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  align-items: flex-end;
}

@media (max-width: 640px) {
  .footer-nav {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
  }
}

.footer-nav a {
  font-size: 0.875rem;
  color: #4e6e85;
  transition: color var(--transition);
}

.footer-nav a:hover { color: #94a3b8; }

.footer-bottom {
  font-size: 0.8125rem;
  color: #3a5166;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-accent    { color: var(--accent); }
.text-center    { text-align: center; }
.mt-0           { margin-top: 0; }
.mb-0           { margin-bottom: 0; }

hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* ---------- Responsive typography helpers ---------- */
@media (max-width: 640px) {
  .hero {
    padding: 5rem 0 4.5rem;
  }

  .section {
    padding: 3.75rem 0;
  }

  .section-lead {
    margin-bottom: 2rem;
  }

  .cta-band {
    padding: 3.75rem 0;
  }

  .page-hero {
    padding: 3rem 0 2.5rem;
  }
}
