/* ============================
   Gibyt — Design Tokens
   ============================ */
:root {
  --ink: #0B0A17;
  --indigo: #1800AD;
  --indigo-deep: #10007A;
  --indigo-tint: #ECEAFA;
  --slate: #5C5A73;
  --white: #FFFFFF;
  --border: #DEDBF2;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  --max-width: 1120px;
  --radius-sm: 6px;
  --radius-md: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--slate); }

.section {
  padding: 5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-tint {
  max-width: none;
  background: var(--indigo-tint);
}
.section-tint > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}
.section-lede { font-size: 1.05rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--indigo);
  color: var(--white);
}
.btn-primary:hover { background: var(--indigo-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }

.text-link {
  color: var(--indigo);
  font-weight: 600;
}
.text-link:hover { text-decoration: underline; }

/* ============================
   Header / Navbar
   ============================ */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo { height: 85px; width: auto; }

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}
.nav-links a.active,
.nav-links a:hover { color: var(--indigo); }

.nav-links a.btn { color: var(--white); }
.nav-links a.btn:hover { color: var(--white); }

.nav-login { padding: 0.55rem 1.25rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
}

/* ============================
   Hero
   ============================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem 5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-inner { max-width: 640px; position: relative; z-index: 1; }

.eyebrow {
  color: var(--indigo);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Quiet bit-grid motif — nods to "gigabytes" without being a circuit-board cliche */
.hero-grid {
  position: absolute;
  top: -10%;
  right: -8%;
  width: 60%;
  height: 120%;
  background-image: radial-gradient(var(--indigo-tint) 2px, transparent 2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 70% 40%, black 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 70% 40%, black 0%, transparent 65%);
  opacity: 0.9;
  z-index: 0;
}

/* ============================
   What We Do — editorial list
   ============================ */
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.service-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.service-row h3 { margin: 0; }
.service-row p { margin: 0; max-width: 520px; }

/* ============================
   Placeholder cards (Products / Work teasers)
   ============================ */
.placeholder-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  max-width: 640px;
}

.status-pill {
  display: inline-block;
  background: var(--indigo-tint);
  color: var(--indigo-deep);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.status-pill-muted {
  background: #F1F0F5;
  color: var(--slate);
}

/* ============================
   Why Gibyt — dark band
   ============================ */
.section-dark {
  max-width: none;
  background: var(--ink);
  color: var(--white);
  padding: 5rem 1.5rem;
}
.why-inner {
  max-width: 640px;
  margin: 0 auto;
}
.section-dark h2 { color: var(--white); }
.section-dark p { color: #C9C7DA; font-size: 1.1rem; }

/* ============================
   CTA
   ============================ */
.cta-section {
  text-align: center;
}
.cta-section .hero-actions { justify-content: center; }
.cta-section p { max-width: 480px; margin-left: auto; margin-right: auto; }

/* ============================
   Footer
   ============================ */
.site-footer {
  background: var(--indigo-tint);
  padding: 3.5rem 1.5rem 1.5rem;
}

.footer-top {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-logo { height: 50px; margin-bottom: 0.75rem; }
.footer-tagline { font-size: 0.85rem; color: var(--slate); margin: 0; }

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  margin: 0 0 0.75rem;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  color: var(--ink);
}
.footer-col a:hover { color: var(--indigo); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.25rem;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--slate);
  margin: 0;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 860px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

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

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 0.6rem 0; }
  .nav-links a.btn { width: auto; margin-top: 0.5rem; }

  .hero-grid { width: 90%; opacity: 0.6; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-links a { transition: none; }
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

/* ============================
   Interior page hero (About / Work / Products / Careers / Contact)
   ============================ */
.page-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 2.5rem;
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}
.page-hero .hero-sub { max-width: 560px; }

/* ============================
   About page
   ============================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 3rem;
}
.about-block h3 { color: var(--indigo-deep); }
.value-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--slate);
}
.value-list li { margin-bottom: 0.4rem; }

.placeholder-card-wide { max-width: 720px; }

/* ============================
   Products page
   ============================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}
.product-card h3 { margin-bottom: 0.4rem; }

/* ============================
   Contact page
   ============================ */
.contact-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-row label {
  font-size: 0.9rem;
  font-weight: 600;
}
.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--indigo);
}
.form-row.invalid input,
.form-row.invalid textarea {
  border-color: #C0304A;
}
.form-error {
  font-size: 0.82rem;
  color: #C0304A;
  min-height: 1em;
}

.contact-form .btn { align-self: flex-start; }

.form-status {
  font-size: 0.9rem;
  color: var(--indigo-deep);
  min-height: 1.2em;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding-top: 0.25rem;
}
.contact-info h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  margin: 0 0 0.5rem;
}
.contact-info a {
  display: block;
  color: var(--indigo);
  font-weight: 500;
  padding: 0.15rem 0;
}

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-section { grid-template-columns: 1fr; }
}

/* ============================
   Auth (Login / Signup)
   ============================ */
.auth-section {
  max-width: 480px;
  padding-top: 1rem;
}
.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--slate);
}
.checkbox-row input { margin: 0; }
.auth-switch {
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

/* ============================
   Flash messages
   ============================ */
.flash-messages {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
}
.flash {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}
.flash-success {
  background: var(--indigo-tint);
  color: var(--indigo-deep);
}
.flash-error {
  background: #FBE9ED;
  color: #C0304A;
}
.flash-info {
  background: #F1F0F5;
  color: var(--slate);
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.settings-grid .auth-card {
  background: var(--white);
}
.settings-grid h3 {
  margin-bottom: 1rem;
}

/* ============================
   Profile photo
   ============================ */
.profile-photo {
  border-radius: 50%;
  object-fit: cover;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

/* ============================
   Modern file input (replaces default browser button)
   ============================ */
input[type="file"] {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--slate);
}
input[type="file"]::file-selector-button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  margin-right: 0.75rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}
input[type="file"]::file-selector-button:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}
/* Safari fallback (older versions use webkit-prefixed pseudo-element) */
input[type="file"]::-webkit-file-upload-button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  margin-right: 0.75rem;
}

/* ============================
   Case studies (Our Work)
   ============================ */
.case-study {
  max-width: 720px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.case-header h3 { margin: 0; }
.case-field { margin-bottom: 0.6rem; }
.case-field strong { color: var(--ink); }

/* ============================
   DYNAMIS product cards
   ============================ */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(11, 10, 23, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: #C8C3EA;
  box-shadow: 0 14px 34px rgba(11, 10, 23, 0.09);
}

.product-card-featured {
  border: 1.5px solid var(--indigo);
  background: linear-gradient(145deg, #fff 0%, #F8F7FF 100%);
}

.product-card-muted {
  box-shadow: none;
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.product-card .status-pill {
  margin: 0;
}

.product-live-pill {
  background: var(--indigo);
  color: var(--white);
}

.product-offer {
  color: var(--indigo-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.product-description {
  max-width: 48rem;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-top: auto;
  padding: 1rem 0 1.15rem;
}

.product-price-current {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
}

.product-price-old {
  color: var(--slate);
  font-size: 1rem;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.product-cta {
  align-self: flex-start;
}

.dashboard-product-card {
  max-width: 720px;
}

/* ============================
   Profile
   ============================ */
.profile-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.profile-card {
  width: min(100%, 760px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11, 10, 23, 0.06);
}

.profile-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.8fr);
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.profile-avatar {
  width: 84px;
  height: 84px;
  border: 1px solid var(--border);
  background: var(--indigo-tint);
}

.profile-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--indigo-deep);
  font-size: 1.6rem;
}

.profile-identity h3 {
  margin: 0.1rem 0 0.15rem;
  overflow-wrap: anywhere;
}

.profile-identity p {
  margin: 0;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.profile-label {
  color: var(--slate);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-upload {
  min-width: 0;
}

.profile-upload label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-upload input[type="file"] {
  width: 100%;
}

.profile-fields {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
}

.profile-fields .form-row {
  min-width: 0;
}

.profile-fields textarea,
.profile-fields input {
  width: 100%;
  min-height: 46px;
}

.profile-fields textarea {
  min-height: 112px;
}

.profile-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.profile-card-footer p {
  margin: 0;
  font-size: 0.82rem;
}

.profile-card-footer .btn {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .product-card-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .profile-card {
    padding: 1.15rem;
  }

  .profile-card-header,
  .profile-fields {
    grid-template-columns: 1fr;
  }

  .profile-card-header {
    align-items: start;
  }

  .profile-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-card-footer .btn {
    width: 100%;
  }
}
