/* ---------------------------------------------------------------
   GRIND HOUSE - Vintage Coffee Tin Aesthetic
   Weathered enamel cream, warm brass ornaments, rich coffee brown
   --------------------------------------------------------------- */

@font-face {
  font-family: 'Bebas Neue';
  src: url('assets/fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #2C1810;
  --ink-muted: #6B4423;
  --bg: #FAFAF8;
  --surface: #EEEDE8;
  --rule: #8B6914;
  --accent: #7A5F0A;
  --accent-ink: #F4EBD9;

  scrollbar-color: var(--rule) transparent;
  caret-color: var(--accent);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F4EBD9;
    --ink-muted: #D4A574;
    --bg: #2C1810;
    --surface: #3D2618;
    --rule: #D4A574;
    --accent: #D4A574;
    --accent-ink: #2C1810;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent any overflowing element from widening the document past the
   viewport. Without this a single oversized heading or image at a
   narrow viewport stretches the scroll width, which makes every
   paragraph on the page measure as flush to the viewport edge. */
html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* The surfaces you did not draw, which otherwise ship with browser
   defaults belonging to no design system. */
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

/* Put on any cell holding a figure, so columns of numbers line up. */
.num {
  font-variant-numeric: tabular-nums;
}

/* 44px is the smallest reliably tappable target. Anything the reader
   presses needs it; a link inside a paragraph does not, which is why
   this is not on `a`. */
button,
[role="button"],
summary,
input[type="checkbox"],
input[type="radio"] {
  min-height: 44px;
}

button {
  min-width: 44px;
}

/* A document is one column, so the only thing that reliably breaks it
   is content that cannot shrink: a wide table, a long URL, a code
   block. These make the narrow viewport survivable without needing a
   layout per breakpoint. */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

pre {
  overflow-x: auto;
}

table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 480px) {
  body {
    /* Thumbs cover the edges; text should not start underneath them. */
    padding-inline: 1rem;
  }
}

/* Motion only for readers who have not asked the OS to stop it. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
}
@media (max-width: 480px) {
  /* --impeccable-mobile-pad */
  body { padding-inline: max(1rem, 16px); }
  .container, [class*="container"], section, header, footer, nav, main, article {
    padding-inline: max(1rem, 16px);
  }
}
/* --impeccable-measure */
p, li, dt, dd, blockquote, figcaption, td, th { max-width: min(75ch, 100%); }

/* ---------------------------------------------------------------
   Futurist Layout - Diagonal Wood-Type at Engine Speed
   --------------------------------------------------------------- */

body {
  font-family: 'Bebas Neue', Impact, 'Arial Black', sans-serif;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Aluminum bolt heads riveting the composition */
.bolt {
  position: fixed;
  z-index: 1000;
  width: 144px;
  height: 179px;
  object-fit: contain;
  pointer-events: none;
}

.bolt-top-left {
  top: 0;
  left: 0;
}

.bolt-bottom-right {
  bottom: 0;
  right: 0;
  width: 288px;
  height: 179px;
}

/* Navigation - minimal black caps along top */
.nav {
  position: relative;
  display: flex;
  gap: 3rem;
  padding: 1.5rem 2rem;
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease-out;
}

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

/* Hero section - explosive diagonal lead */
.hero {
  position: relative;
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 5% 2rem 2rem;
  margin-bottom: 2rem;
}

/* GRIND HOUSE - rotated 35 degrees clockwise */
.shop-name {
  margin: 0;
  font-size: clamp(4rem, 15vw, 12rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.05em;
  color: var(--ink);
  transform: rotate(35deg);
  transform-origin: left center;
  text-transform: uppercase;
  position: relative;
  left: 5%;
  margin-bottom: 1rem;
}

/* Tagline - counter-angle */
.tagline {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--ink);
  transform: rotate(-18deg);
  transform-origin: left top;
  text-transform: uppercase;
  position: relative;
  left: 15%;
  top: -2rem;
  max-width: 80%;
}

/* Menu - typographic collision of prices and items */
.menu {
  position: relative;
  min-height: 30rem;
  padding: 2rem 2rem;
  margin-bottom: 2rem;
}

.menu-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.menu-americano {
  top: 0;
  left: 5%;
  transform: rotate(28deg);
}

.menu-cappuccino {
  top: 1rem;
  left: 35%;
  transform: rotate(-32deg);
}

.menu-cortado {
  top: 0.5rem;
  right: 8%;
  transform: rotate(40deg);
}

.menu-croissant {
  top: 12rem;
  left: 2%;
  transform: rotate(-25deg);
}

.menu-bun {
  top: 11rem;
  right: 5%;
  transform: rotate(20deg);
}

.item-price {
  font-size: 1.2em;
  color: var(--ink-muted);
}

/* Hours - heavy condensed block tilted */
.hours-section {
  position: relative;
  min-height: 20vh;
  padding: 2rem;
  margin-bottom: 24rem;
}

.hours {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  transform: rotate(18deg);
  transform-origin: left top;
  position: relative;
  left: 2%;
  max-width: 85%;
}

.hours-line {
  text-wrap: nowrap;
}

/* Contact section */
.contact-section {
  position: relative;
  display: flex;
  gap: 4rem;
  padding: 3rem 5% 4rem 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* VISIT US - mechanical red CTA */
.cta {
  display: inline-block;
  padding: 1.25rem 3rem;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  text-decoration: none;
  border: 3px solid var(--ink);
  transform: rotate(-8deg);
  transition: all 0.15s ease-out;
}

.cta:hover {
  transform: rotate(-8deg) scale(1.05);
  box-shadow: 6px 6px 0 var(--ink);
}

/* Contact form - mechanical caps */
.contact-form {
  flex: 1;
  min-width: min(100%, 24rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  padding: 0.875rem 1rem;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.25rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}

.contact-form button {
  align-self: flex-start;
  padding: 1rem 2.5rem;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--ink);
  border: 3px solid var(--ink);
  cursor: pointer;
  transition: all 0.15s ease-out;
}

.contact-form button:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--ink);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .shop-name {
    font-size: clamp(3rem, 12vw, 8rem);
    transform: rotate(25deg);
  }

  .tagline {
    font-size: clamp(1rem, 2.5vw, 1.75rem);
    transform: rotate(-15deg);
  }

  .menu {
    min-height: 50vh;
  }

  .menu-item {
    font-size: clamp(1.5rem, 4vw, 3rem);
  }

  .menu-americano { left: 2%; top: 0; }
  .menu-cappuccino { left: 5%; top: 6rem; }
  .menu-cortado { right: 2%; top: 3rem; }
  .menu-croissant { left: 0%; top: 18rem; }
  .menu-bun { right: 0%; top: 16rem; }

  .hours {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    transform: rotate(20deg);
  }

  .contact-section {
    flex-direction: column;
    gap: 2rem;
  }

  .cta {
    transform: rotate(-5deg);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  }

  .cta:hover {
    transform: rotate(-5deg) scale(1.05);
  }
}

/* Contact form confirmation */
.contact-confirmation {
  flex: 1;
  min-width: min(100%, 24rem);
  padding: 2rem;
  background: var(--surface);
  border: 3px solid var(--accent);
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confirmation-title {
  margin: 0 0 1.5rem 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.confirmation-details {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg);
  border: 2px solid var(--rule);
}

.confirmation-details p {
  margin: 0.75rem 0;
  font-size: 1rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
  word-break: break-word;
}

.confirmation-details strong {
  display: inline-block;
  min-width: 5rem;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.confirmation-note {
  margin: 0;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Print styles - flatten rotations for readability */
@media print {
  .bolt {
    display: none;
  }

  .shop-name,
  .tagline,
  .menu-item,
  .hours,
  .cta {
    transform: none;
    position: static;
  }

  .menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: auto;
  }

  .menu-item {
    flex-direction: row;
    justify-content: space-between;
  }

  .contact-form {
    display: none;
  }
}
