/* ====================================
   FOE CONTRACT — Notebook/Sketchbook Theme
   ==================================== */

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

/* ── VARIABLES ── */
:root {
  --kraft: #d4a76a;
  --kraft-light: #e8c88a;
  --kraft-dark: #b8894e;
  --navy: #1b2838;
  --navy-light: #2a3d55;
  --red: #e74c3c;
  --red-light: #f1948a;
  --paper: #f5edd6;
  --paper-light: #faf3e0;
  --shadow: rgba(27, 40, 56, 0.15);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Caveat', 'Segoe Print', cursive;
  --font-mono: 'Courier New', Courier, monospace;
  --max-width: 960px;
  --tab-width: 180px;
  --sketch-wobble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 10 Q5 8 10 10 T20 10' stroke='%231b2838' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* ── BASE ── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--navy);
  background: var(--kraft);
  min-height: 100vh;
  padding: 2rem;
  padding-left: calc(var(--tab-width) + 3rem);
  position: relative;
}

/* ── SKETCHED BORDER (hand-drawn knotch effect) ── */
.sketch-frame {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--navy);
  border-radius: 4px 12px 12px 4px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow:
    4px 4px 0 var(--shadow),
    inset 0 0 0 1px var(--paper-light);
}

.sketch-frame::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 1.5px dashed var(--navy);
  border-radius: 6px 14px 14px 6px;
  pointer-events: none;
  opacity: 0.3;
}

.sketch-frame::after {
  content: '✎';
  position: absolute;
  top: -12px;
  right: 12px;
  font-size: 1.5rem;
  color: var(--red);
  background: var(--paper);
  padding: 0 8px;
  line-height: 1;
  transform: rotate(12deg);
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2.5px dashed var(--red);
  display: inline-block;
}

h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
}

a:hover {
  color: var(--navy);
  text-decoration-style: wavy;
}

ul, ol {
  margin-bottom: 1.2rem;
  padding-left: 1.8rem;
}

li {
  margin-bottom: 0.4rem;
}

strong {
  color: var(--navy-light);
  font-weight: 700;
}

/* ── PAPER TAB NAVIGATION ── */
.page-tabs {
  position: fixed;
  left: 1rem;
  top: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.paper-tab {
  display: block;
  width: var(--tab-width);
  padding: 0.6rem 0.8rem 0.6rem 1.2rem;
  background: var(--paper);
  border: 2px solid var(--navy);
  border-right: none;
  border-radius: 8px 0 0 8px;
  position: relative;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: -2px 2px 0 var(--shadow);
  cursor: pointer;
}

.paper-tab::before {
  content: '◈';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--red);
  opacity: 0.5;
}

.paper-tab::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -8px;
  width: 10px;
  height: calc(100% + 4px);
  background: inherit;
  border: 2px solid var(--navy);
  border-left: none;
  border-radius: 0 4px 4px 0;
  clip-path: polygon(0 0, 100% 6px, 100% calc(100% - 6px), 0 100%);
}

.paper-tab:hover,
.paper-tab.active {
  background: var(--paper-light);
  transform: translateX(4px);
  border-color: var(--red);
  color: var(--red);
}

.paper-tab.active::before {
  color: var(--red);
  opacity: 1;
}

.paper-tab .tab-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  display: block;
  color: var(--navy-light);
  margin-top: -2px;
}

/* ── HEADER / SITE TITLE ── */
.site-header {
  margin-bottom: 2rem;
}

.site-header .stamp {
  display: inline-block;
  background: var(--red);
  color: var(--paper);
  padding: 0.2rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-1deg);
  margin-bottom: 0.5rem;
}

.site-header h1 {
  font-size: 3.2rem;
  line-height: 1;
}

.site-header .subhead {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--navy-light);
  border-left: 3px solid var(--navy);
  padding-left: 1rem;
  margin-top: 0.5rem;
}

/* ── PROJECT BRIEF SECTION ── */
.project-brief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.brief-item {
  border-left: 3px solid var(--navy);
  padding-left: 1rem;
}

.brief-item .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  display: block;
  margin-bottom: 0.2rem;
}

.brief-item .value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
}

.brief-item .value a {
  font-family: var(--font-display);
}

/* ── TEAM GRID ── */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.team-card {
  background: var(--paper-light);
  border: 2px solid var(--navy);
  padding: 1.5rem;
  border-radius: 4px 10px 10px 4px;
  position: relative;
}

.team-card::before {
  content: '✦';
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--paper);
  padding: 0 4px;
  color: var(--red);
  font-size: 0.9rem;
}

.team-card .role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.team-card .name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
}

/* ── BLUEPRINT / SERVICE CARDS ── */
.blueprint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.blueprint-card {
  background: var(--paper-light);
  border: 2px solid var(--navy);
  padding: 1.5rem;
  position: relative;
  border-radius: 4px 10px 10px 4px;
}

.blueprint-card::before {
  content: '🔧';
  position: absolute;
  top: -10px;
  right: 12px;
  font-size: 1.2rem;
  background: var(--paper);
  padding: 0 4px;
}

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

/* ── CONTACT INTAKE ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info p {
  font-family: var(--font-body);
}

.contact-info strong {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--red);
}

.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy-light);
  margin-bottom: 0.3rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--navy);
  border-radius: 4px;
  background: var(--paper-light);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 1rem;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--red);
  background: #fff;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-sketch {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.3rem;
  border: 2px solid var(--navy);
  border-radius: 4px 10px 10px 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-sketch:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  transform: scale(1.02);
}

/* ── POLICY / TOS SECTIONS ── */
.policy-section,
.tos-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1.5px dashed var(--kraft-dark);
}

.policy-section:last-child,
.tos-section:last-child {
  border-bottom: none;
}

.policy-section h2,
.tos-section h2 {
  font-size: 1.8rem;
}

.section-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  margin-right: 0.3rem;
}

/* ── FOOTER ── */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2.5px dashed var(--red);
  text-align: center;
  font-size: 0.85rem;
  color: var(--navy-light);
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.site-footer .footer-links a {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.site-footer .footer-stamp {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--navy-light);
  letter-spacing: 0.05em;
}

/* ── SVG FAVICON ── */
/* inline in head */

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .project-brief,
  .team-grid,
  .blueprint-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
    padding-top: 80px;
  }

  .page-tabs {
    left: 0;
    right: 0;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    gap: 0;
    background: var(--kraft);
    padding: 0.3rem 0.5rem;
    border-bottom: 2px solid var(--navy);
  }

  .paper-tab {
    width: auto;
    min-width: 70px;
    padding: 0.4rem 0.7rem;
    border: 2px solid var(--navy);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
  }

  .paper-tab::after {
    display: none;
  }

  .paper-tab .tab-label {
    display: none;
  }

  .paper-tab::before {
    display: none;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .sketch-frame {
    padding: 1.5rem;
  }

  .site-header h1 {
    font-size: 2.4rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.6rem;
    padding-top: 70px;
  }

  .sketch-frame {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
  }
}

/* ── MISC NOTEBOOK ELEMENTS ── */
.margin-note {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  border: 1px dashed var(--red);
  padding: 0.5rem;
  margin: 1rem 0;
  background: var(--paper-light);
}

.margin-note::before {
  content: '📝 ';
}

.strikethrough-note {
  text-decoration: line-through;
  color: var(--navy-light);
  opacity: 0.7;
}

.divider-sketch {
  border: none;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--navy) 0px,
    var(--navy) 6px,
    transparent 6px,
    transparent 10px
  );
  margin: 2rem 0;
}
