/* =====================================================================
   Totally Werks — landing page
   Cartoon-craftsman: cream paper, wooden plank frames, navy + wood blocks,
   bold rounded display type. No JS. No external fonts. System stack only.
   ===================================================================== */

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

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

/* === Tokens ========================================================== */
:root {
  /* Surface — warm cream paper */
  --cream:        #F4ECD7;     /* page background */
  --cream-deep:   #E8DEC0;     /* card surface */
  --cream-soft:   #FAF4E4;     /* subtle highlight */

  /* Wood tones — sampled from the wordmark plank "E" */
  --wood-deep:    #5F4828;
  --wood:         #8B6F47;
  --wood-light:   #B58E5C;
  --wood-bright:  #D4A571;

  /* Navy — sampled from the wordmark letterforms */
  --navy-deep:    #1B2540;
  --navy:         #2D3F7A;
  --navy-soft:    #5670B5;

  /* Ink for text on cream */
  --ink:          #1A1F2E;
  --ink-soft:     #4A5470;
  --ink-mute:     #7A8093;

  /* Hairlines on cream */
  --rule:         rgba(45, 63, 122, 0.14);
  --rule-wood:    rgba(95, 72, 40, 0.30);

  /* Layout */
  --max-w:        980px;
  --gutter:       clamp(1.25rem, 4vw, 2.5rem);

  /* Type */
  --display:
    ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
    -apple-system, BlinkMacSystemFont, "Segoe UI Variable",
    "Segoe UI", system-ui, sans-serif;
  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI Variable",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Motion */
  --ease:         cubic-bezier(.2, .6, .2, 1);
  --dur-1:        180ms;
  --dur-2:        420ms;
}

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

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* === Skip link ======================================================= */
.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
}
.skip:focus,
.skip:focus-visible {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.6rem 0.9rem;
  background: var(--navy-deep);
  color: var(--cream);
  border-radius: 6px;
  font-weight: 700;
  outline: 3px solid var(--wood-bright);
  outline-offset: 2px;
  text-decoration: none;
}

/* === Wooden plank frame primitive ==================================== */
/*
   The signature visual element. Used on hero + Caster card.
   Multi-layer box-shadow creates: thin dark inner edge -> wood band ->
   thin dark outer edge -> outset drop shadow. Decorative "screw" dots
   at the four corners via positioned spans.
*/
.frame {
  position: relative;
  background: var(--cream-soft);
  border-radius: 14px;
  box-shadow:
    /* inner dark edge */
    inset 0 0 0 2px var(--wood-deep),
    /* drop shadow (outset) */
    0 8px 24px rgba(45, 30, 15, 0.18),
    0 2px 4px rgba(45, 30, 15, 0.10);
  /* the wood band itself is created by the outline + outline-offset */
  outline: 14px solid var(--wood);
  outline-offset: -1px;
  margin: 1rem 0.75rem;
  /* clip the ::before outer dark edge and partial screws — keeps the
     frame visually clean and consistent at any container size */
  overflow: hidden;
}

/* darker outer edge of the wood band */
.frame::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 16px;
  border: 2px solid var(--wood-deep);
  pointer-events: none;
}

/* corner screws — small radial-gradient circles, sized to read consistently
   across hero and Caster card scales */
.frame .screw {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, var(--cream-soft) 0%, var(--wood-light) 35%, var(--wood-deep) 100%);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.45),
    inset 0 0 0 0.5px var(--wood-deep);
  z-index: 2;
}
.frame .screw::before {
  /* slot mark */
  content: "";
  position: absolute;
  inset: 28% 18%;
  background: var(--wood-deep);
  border-radius: 1px;
  transform: rotate(35deg);
  opacity: 0.65;
}
.frame .screw--tl { top: -3.5px;    left: -3.5px; }
.frame .screw--tr { top: -3.5px;    right: -3.5px; }
.frame .screw--bl { bottom: -3.5px; left: -3.5px; }
.frame .screw--br { bottom: -3.5px; right: -3.5px; }

/* === Hero ============================================================ */
.hero {
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.hero__frame {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.hero__logo {
  width: clamp(280px, 50vw, 520px);
  margin: 0.5rem 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.hero__tagline {
  font-family: var(--display);
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--navy-deep);
  max-width: 32ch;
  margin-top: 0.5rem;
}

.hero__subline {
  font-family: var(--sans);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--ink-soft);
  max-width: 52ch;
  letter-spacing: -0.003em;
  line-height: 1.6;
  font-weight: 400;
}

/* Capability chips */
.hero__cards {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  max-width: 42rem;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
  padding: 0;
}

.hero__card {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-deep);
  padding: 0.5rem 0.95rem;
  border: 2px solid var(--wood);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 0 2px 0 var(--wood-deep);
  transition: transform var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease),
              background-color var(--dur-1) var(--ease);
}

/* === Sections ======================================================== */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section + .section {
  position: relative;
  border-top: none;
}

/* Striped wood plank divider — reuses the footer's vocabulary */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--wood) 0,
    var(--wood) 60px,
    var(--wood-deep) 60px,
    var(--wood-deep) 62px,
    var(--wood) 62px
  );
  border-radius: 2px;
  opacity: 0.55;
}

.section__title {
  font-family: var(--display);
  font-size: clamp(1.875rem, 3.4vw, 2.625rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--navy-deep);
  margin-bottom: 1.25rem;
  text-align: center;
}

.section__title::before,
.section__title::after {
  content: "";
  display: inline-block;
  width: 44px;
  height: 10px;
  background: var(--wood);
  border-radius: 4px;
  vertical-align: middle;
  transform: translateY(-5px);
  box-shadow: 0 2px 0 var(--wood-deep);
}

.section__title::before { margin-right: 0.85rem; }
.section__title::after  { margin-left:  0.85rem; }

.section__lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section__lede + .section__lede,
.section__lede + .capabilities {
  margin-top: 1.5rem;
}

/* === Caster card (wooden frame) ====================================== */
.product-card {
  padding: clamp(2.25rem, 3.5vw, 2.75rem) clamp(2rem, 3.5vw, 2.75rem);
}

.product-card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.product-card__name {
  display: flex;
  align-items: center;
  margin: 0;
  /* font props kept as fallback if logo fails to load (uses alt text) */
  font-family: var(--display);
  font-size: clamp(1.625rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  color: var(--navy-deep);
}

/* Caster's wordmark uses light cyan/white gradients designed for dark
   backgrounds — give it a navy plaque so it reads against the cream card
   without breaking Caster's brand integrity. */
.product-card__brand {
  display: inline-flex;
  align-items: center;
  background: var(--navy-deep);
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  border: 2px solid var(--wood);
  box-shadow: 0 2px 0 var(--wood-deep);
}

.product-card__logo {
  width: clamp(140px, 22vw, 200px);
  height: auto;
  display: block;
}

.product-card__tag {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: 0 2px 0 var(--navy-deep);
}

.product-card__body {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto;
  text-align: center;
}

.product-card__status {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--wood-deep);
  font-style: italic;
  font-weight: 600;
  text-align: center;
}

/* === Capabilities tiles (contract section) =========================== */
.capabilities {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

.capabilities__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  padding: 1.5rem 1rem;
  background: var(--cream-deep);
  border: 2px solid var(--wood);
  border-radius: 12px;
  box-shadow: 0 2px 0 var(--wood-deep);
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.003em;
  line-height: 1.3;
  color: var(--navy-deep);
  transition: transform var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease),
              background-color var(--dur-1) var(--ease);
}

.capabilities__item:hover {
  background: var(--cream-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--wood-deep);
}

.capabilities__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--wood);
  padding: 8px;
  background: var(--cream-soft);
  border: 1.5px solid var(--rule-wood);
  border-radius: 50%;
}

.capabilities__label {
  flex: 1;
}

/* === Contact ========================================================= */
.section--contact {
  text-align: center;
}

.contact__lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 auto 1.75rem;
  max-width: 56ch;
  text-align: center;
}

.contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.85rem;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cream);
  background: var(--navy);
  border: 2px solid var(--navy-deep);
  border-radius: 14px;
  text-decoration: none;
  box-shadow:
    0 5px 0 var(--navy-deep),
    0 8px 16px rgba(27, 37, 64, 0.25);
  transition: transform var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease),
              background-color var(--dur-1) var(--ease);
}

.contact__btn:hover {
  background: var(--navy-soft);
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 var(--navy-deep),
    0 10px 20px rgba(27, 37, 64, 0.28);
}

.contact__btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 var(--navy-deep),
    0 3px 6px rgba(27, 37, 64, 0.15);
}

.contact__btn:focus-visible {
  outline: 3px solid var(--wood);
  outline-offset: 4px;
}

/* === Footer ========================================================== */
.footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  background: var(--cream-deep);
  color: var(--ink);
  border-top: 4px solid var(--wood);
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--wood) 0,
      var(--wood) 60px,
      var(--wood-deep) 60px,
      var(--wood-deep) 62px,
      var(--wood) 62px
    );
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.75rem var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.footer__logo {
  width: clamp(110px, 14vw, 150px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.20));
}

.footer__line {
  font-size: 0.875rem;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
  text-align: center;
}

.footer__signoff {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wood-deep);
  white-space: nowrap;
}

/* === Tablet ========================================================== */
@media (max-width: 900px) {
  .capabilities {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === Mobile ========================================================== */
@media (max-width: 760px) {
  .frame {
    margin: 0.5rem 0;
  }

  .hero__frame {
    padding: 2.25rem 1.25rem;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 1rem;
  }
}

/* === Reduced motion ================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
