/* ==========================================================================
   HTML5 Boilerplate styles - h5bp.com (generated via initializr.com)
   ========================================================================== */

html,
button,
input,
select,
textarea {
  color: #222;
}

body {
  font-size: 1em;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

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

a:visited {
  color: var(--color-link-visited);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
  text-decoration: underline;
}

/* Ensure focus is visible on interactive elements */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

::-moz-selection {
  background: var(--color-accent);
  text-shadow: none;
}

::selection {
  background: var(--color-accent);
  text-shadow: none;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

img {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

.chromeframe {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

/* ==========================================================================
   Design System - CSS Custom Properties (Grafo Brand)
   ========================================================================== */

:root {
  /* Colors - Grafo Brand (Green accent - monitoring/status) */
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.9);
  --color-text-tertiary: rgba(255, 255, 255, 0.7);
  --color-link: #00c853;
  --color-link-hover: #33d67a;
  --color-link-visited: #7bc8a4;
  --color-accent: #00c853;

  /* Backgrounds - Tinted blacks (green tint for Grafo) */
  --color-bg-primary: #060e0a;
  --color-bg-secondary: #0a1a10;
  --color-bg-overlay: rgba(6, 14, 10, 0.9);
  --color-bg-overlay-light: rgba(6, 14, 10, 0.75);

  /* Typography Scale */
  --font-family-base: 'lane_-_narrowregular', Helvetica, Arial, sans-serif;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-bold: 700;

  --font-size-h1: clamp(32px, 5vw, 48px);
  --font-size-h2: clamp(24px, 3.5vw, 32px);
  --font-size-h3: clamp(20px, 2.5vw, 28px);
  --font-size-h4: 18px;
  --font-size-body: 16px;
  --font-size-small: 14px;
  --font-size-tiny: 12px;

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;

  --letter-spacing-normal: 0.5px;
  --letter-spacing-wide: 1px;

  /* Spacing Scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 60px;
  --space-2xl: 80px;

  /* Layout */
  --max-width-content: 1200px;
  --max-width-text: 800px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ==========================================================================
   Custom font
   ========================================================================== */
@font-face {
  font-family: 'lane_-_narrowregular';
  src: url('LANENAR_-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Base styles
   ========================================================================== */

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #000000;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 0;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
}

/* Other apps navigation bar */
.other-apps-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 0;
  z-index: 100;
}

.other-apps-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.other-apps-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.other-app-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  padding: var(--space-xs);
  border-radius: var(--border-radius-sm);
}

.other-app-link:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.other-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.other-app-link span {
  font-size: var(--font-size-small);
}

.other-apps-title {
  font-size: var(--font-size-small);
  color: var(--color-text-tertiary);
}

.other-apps-title-short {
  display: none;
}

/* Mobile: shorten title text */
@media only screen and (max-width: 499px) {
  .other-apps-title-full {
    display: none;
  }

  .other-apps-title-short {
    display: inline;
  }

  .hero-section {
    padding-top: 70px !important;
  }
}

body {
  font-family: var(--font-family-base);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-text-primary);
  background-image: url("../img/background.jpeg");
  background-color: var(--color-bg-primary);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: normal;
}

h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-tight);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-normal);
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--color-accent);
}

h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-md);
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h4 {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-normal);
  margin: 0 0 var(--space-sm) 0;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 40px 20px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-overlay);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.hero-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 20px;
  border-radius: 17.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-text h1 {
  margin-bottom: 10px;
}

.hero-text h2 {
  margin-bottom: 20px;
  opacity: 0.9;
  color: var(--color-accent);
}

.hero-description {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 600px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.cta-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.app-store-link {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-link:hover,
.app-store-link:focus {
  transform: translateY(-2px);
  opacity: 0.9;
}

.app-store-link img {
  display: block;
}

.coming-soon {
  font-size: 18px;
  font-weight: bold;
  color: var(--color-accent);
  padding: 12px 24px;
  background: rgba(0, 200, 83, 0.1);
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  margin: 0;
  display: inline-block;
}

.hero-screenshots {
  display: flex;
  justify-content: center;
  align-items: center;
}

.screenshot-main {
  max-width: 320px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 200, 83, 0.2);
}

/* ==========================================================================
   Screenshot Gallery
   ========================================================================== */

.screenshot-gallery {
  background: var(--color-bg-overlay-light);
  padding: var(--space-xl) var(--space-sm);
  backdrop-filter: blur(10px);
  will-change: backdrop-filter;
}

@media (prefers-reduced-motion: reduce) {
  .screenshot-gallery {
    backdrop-filter: none;
    background: var(--color-bg-overlay);
  }
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
}

.gallery-item {
  text-align: center;
}

.gallery-item img {
  max-width: 320px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 200, 83, 0.2);
  margin-bottom: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 200, 83, 0.3);
}

.caption {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* ==========================================================================
   iPad Showcase Section
   ========================================================================== */

.ipad-showcase {
  background: var(--color-bg-secondary);
  padding: var(--space-xl) var(--space-sm);
}

.ipad-container {
  max-width: 1200px;
  margin: 0 auto;
}

.ipad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
}

.ipad-item {
  text-align: center;
}

.ipad-item img {
  max-width: 450px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 200, 83, 0.2);
  margin-bottom: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ipad-item img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 200, 83, 0.3);
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
  background: var(--color-bg-secondary);
  padding: var(--space-xl) var(--space-sm);
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.feature h4 {
  margin-bottom: 15px;
}

.feature p {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0;
}

/* ==========================================================================
   Closing Section
   ========================================================================== */

.closing-section {
  background: var(--color-bg-overlay);
  padding: var(--space-2xl) var(--space-sm);
  text-align: center;
}

.closing-container {
  max-width: 800px;
  margin: 0 auto;
}

.closing-container p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: var(--color-bg-primary);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
}

footer p {
  margin: 0;
  font-size: var(--font-size-tiny);
  color: var(--color-text-tertiary);
}

footer a {
  color: var(--color-link);
  transition: color var(--transition-normal);
}

footer a:hover {
  color: var(--color-link-hover);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile specific - better touch targets */
@media only screen and (max-width: 767px) {
  .hero-section {
    min-height: auto;
    padding: 70px var(--space-sm) var(--space-lg);
  }

  .hero-screenshots {
    order: -1;
  }

  .hero-text {
    text-align: center;
  }

  .hero-icon {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-buttons {
    justify-content: center;
  }

  /* Stack gallery on mobile */
  .gallery-grid {
    gap: var(--space-lg);
  }

  /* Stack features on mobile */
  .feature-grid {
    gap: var(--space-lg);
  }
}

/* Tablet Portrait (768px+) */
@media only screen and (min-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ipad-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .ipad-showcase {
    padding: var(--space-2xl) var(--space-md);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .hero-section {
    padding: var(--space-xl) var(--space-md);
  }

  .screenshot-gallery {
    padding: var(--space-2xl) var(--space-md);
  }

  .features-section {
    padding: var(--space-2xl) var(--space-md);
  }
}

/* Tablet Landscape / Small Desktop (1024px+) */
@media only screen and (min-width: 1024px) {
  .hero-section {
    padding: var(--space-2xl) var(--space-lg);
  }

  .screenshot-gallery {
    padding: var(--space-2xl) var(--space-lg);
  }

  .ipad-showcase {
    padding: var(--space-2xl) var(--space-lg);
  }

  .features-section {
    padding: var(--space-2xl) var(--space-lg);
  }

  .closing-section {
    padding: 100px var(--space-lg);
  }

  /* Hover effects for desktop */
  .gallery-item img:hover {
    transform: translateY(-8px);
  }

  .app-store-link:hover {
    transform: translateY(-3px);
  }
}

/* Large Desktop (1440px+) */
@media only screen and (min-width: 1440px) {
  .hero-content,
  .gallery-container,
  .ipad-container,
  .features-container {
    max-width: 1200px;
  }

  .closing-container {
    max-width: 900px;
  }
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Print styles
   ========================================================================== */

@media print {
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  abbr[title]:after {
    content: " (" attr(title) ")";
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }

  @page {
    margin: 0.5cm;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
